title: What went wrong on 200-point SRM on TopCoder?
body: <p>When I submitted the code on TopCoder, it only gave me 60 points on a 200 points SRM.<br>
  I think there is something wrong with the algorithm.</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  #include&lt;sstream&gt;
  using namespace std;
  
  class Time
  {
      public:
      string whatTime(int seconds)
      {
          int hours=0, minutes=0, secs=0;
          ostringstream cHours, cMinutes, cSeconds;
          string sHours, sMinutes, sSeconds;
          string theReturns;
  
          while (seconds &gt; 0)
          {
              if (seconds &gt; 3600)
              {
                  hours++;
                  seconds -= 3600;
              }
              else if (seconds &gt; 60)
              {
                  minutes++;
                  seconds -= 60;
              } else {
                  secs ++;
                  seconds--;
              }
          }
  
          cHours &lt;&lt; hours;
          cMinutes &lt;&lt; minutes;
          cSeconds &lt;&lt; secs;
  
          sHours = cHours.str() + ":";
          sMinutes = cMinutes.str() + ":";
          sSeconds = cSeconds.str();
  
          theReturns = sHours + sMinutes + sSeconds;
  
          return (theReturns);
      }
  };  
  
  /* Main Function for Me, I didn't submitted it on TopCoder, they only want the class */ 
  int main()
  {
      Time myTime;
      cout &lt;&lt; myTime.whatTime(3661);
      return (0);
  }
  </code></pre>