Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int n,P1,P10,P60;
- cin>>n;
- P60=n/60;
- n=n%60;
- P10=n/10;
- n=n%10;
- P1=n;
- if (P1*15>=125)
- {
- P1=0;
- P10++;
- }
- if (440<=P10*125+P1*15)
- {
- P10=0;
- P1=0;
- P60++;
- }
- cout<<P1<<" "<<P10<<" "<<P60;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement