Skip to content

Instantly share code, notes, and snippets.

@masyax
Created December 22, 2016 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masyax/34c803b59f736474036877adf0f272d7 to your computer and use it in GitHub Desktop.
Save masyax/34c803b59f736474036877adf0f272d7 to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int h=0;
int m=0;
int s=0;
while(n!=0){
s++;
if(s==60){
s=0;
m++;
}
if(m==60){
m=0;
h++;
}
n--;
}
cout<<h<<":"<<m<<":"<<s<<endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment