Create 1901.cpp

This commit is contained in:
Kirigaya Kazuto 2016-12-05 21:48:03 +08:00 committed by GitHub
parent 299b05c265
commit 63352a4d26

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;
}