Create 1901.cpp

pull/45/head
Kirigaya Kazuto 2016-12-05 21:48:03 +08:00 committed by GitHub
parent 299b05c265
commit 63352a4d26
1 changed files with 22 additions and 0 deletions

22
QUSTOJ/1901.cpp Normal file
View File

@ -0,0 +1,22 @@
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
char x;
int n;
cin>>n;
while(n--)
{
cin>>a>>x>>b>>x>>c;
cout<<a<<":"<<b<<":"<<c<<endl;
c+=2;
if(c>=60) {b++;c-=60;}
if(b>=60) {a++;b-=60;}
if(a>=24) {a-=24;}
cout<<a<<":"<<b<<":"<<c<<endl;
}
return 0;
}