SRM144 DIV2 200

#include <string>
#include <sstream>
#include <iostream>

class Time {
  public:
    string whatTime(int seconds) {
      int count_m =0;
      int count_t = 0;
      int count_s = 0;

      while(seconds > 60 * 60) {
        seconds -= 60 * 60;
        count_m++;
      }

       while(seconds > 60) {
        seconds -= 60;
        count_t++;
      }

      count_s = seconds;
      stringstream hoge;
      hoge << count_m << ":" << count_t << ":" << count_s;
      
      return hoge.str();
    }
};
広告を非表示にする