Advertisement
SergeyPGUTI

3.1.9

Sep 25th, 2015
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n,P1,P10,P60;
  9.     cin>>n;
  10.     P60=n/60;
  11.     n=n%60;
  12.     P10=n/10;
  13.     n=n%10;
  14.     P1=n;
  15.     if (P1*15>=125)
  16.     {
  17.         P1=0;
  18.         P10++;
  19.     }
  20.     if (440<=P10*125+P1*15)
  21.     {
  22.         P10=0;
  23.         P1=0;
  24.         P60++;
  25.     }
  26.     cout<<P1<<" "<<P10<<" "<<P60;
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement