Quyida muallif tomonidan taqdim etilgan yechimlarni ko'rishingiz mumkin
A. Skuter
#include<iostream>
using namespace std;
int main(){
int a;
cin>>a;
cout<<(a+9)/10;
return 0;
}
B. Darslarning oxiri.
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n,t;
cin>>n;
t=n*45+(n-1)*5+(n-1)/2*10;
cout<<9+t/60<<" "<<t%60;
return 0;
}
3. Shilliqqurt
#include <iostream>
using namespace std;
int main()
{
int h, a, b;
cin >> h >> a >> b;
int delta = a - b;
cout << (h - b -1) / (a - b) + 1;
}
4. A+B
#include<iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
auto s = string(a, '0');
auto t = string(b, '1');
s.append(t);
cout << s.size() << endl;
}
5. Matematik qoldik
#include<iostream>
#include<cmath>
using namespace std;
int main(){
long long a,b,q;
cin>>a>>b;
b = b * ((2 * b + 1) % 2);
long long k = (b+a%b)%b;
cout << k;
}
6. Bo'linadimi?
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout << (a % b) * (b % a) + 1;
}
7. Yugurish yo'lagi
#include <iostream>
using namespace std;
int main(){
int v, t;
cin >> v >> t;
cout << (109 + v * t % 109) % 109 + 1;
}
8. Max
Ushbu masalaga o'zingiz yechim topib ko'ring. Tepadagi usullardan foydalangan holda.