1 #include <iostream> 2 #include <ctime> 3 4 int main (void) { 5 unsigned long in_time_secs; 6 7 std::cin >> in_time_secs; 8 9 time_t seconds(in_time_secs); 10 tm *p = gmtime(&seconds); 11 12 std::cout << p->tm_yday << " days, " 13 << p->tm_hour << ":" 14 << p->tm_min << ":" 15 << p->tm_sec << std::endl; 16 17 return 0; 18 }
