한국어< 中文 فارسی English ไทย All Copyright Reserved 2010-2011 SDUSTOJ TEAM GPL2.0 2003-2011 HUSTOJ Project TEAM Anything about the Problems, Please Contact Admin:admin
#include <iostream> #include <iomanip> using namespace std; class Time { private: int h,m,s; public: Time(){} Time(int hh,int mm,int ss): h(hh),m(mm),s(ss){} public: int hour()const{return h;} int minute()const{return m;} int second()const{return s;} public: int hour(int hh){return h = hh;} int minute(int mm){return m = mm;} int second(int ss ){return s = ss;} }; int main() { Time t; int cases; cin>>cases; for(int i = 1; i <= cases; ++i) { int hour, minute, second; cin>>hour>>minute>>second; t.hour(hour); t.minute(minute); t.second(second); cout<<setw(2)<<setfill('0')<<t.hour()<<":"; cout<<setw(2)<<setfill('0')<<t.minute()<<":"; cout<<setw(2)<<setfill('0')<<t.second()<<endl; } }