fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int G,M,S;
  7. cin>>G>>M>>S;
  8.  
  9. if(S==59){
  10. S=0;
  11. if(M==59){
  12. M=0;
  13. if(G==59){
  14. G=0;
  15. }
  16. else{
  17. G++;
  18. }
  19. }
  20. else{
  21. M++;
  22. }
  23. }
  24. else{
  25. S++;
  26. }
  27.  
  28. cout<<G<<M<<S;
  29.  
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5300KB
stdin
Standard input is empty
stdout
21971-3016793632768