mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1901.cpp
This commit is contained in:
parent
299b05c265
commit
63352a4d26
22
QUSTOJ/1901.cpp
Normal file
22
QUSTOJ/1901.cpp
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user