Created
January 5, 2014 18:53
-
-
Save danicat/8272287 to your computer and use it in GitHub Desktop.
TopCoder SRM 144 Division 2 200 points problem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <string> | |
#include <sstream> | |
using std::vector; | |
using std::string; | |
using std::stringstream; | |
class Time { | |
public: | |
string whatTime(int seconds) { | |
int hh = seconds / 3600; | |
int mm = (seconds % 3600) / 60; | |
int ss = (seconds % 3600) % 60; | |
stringstream st; | |
st << hh << ":" << mm << ":" << ss; | |
return st.str(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment