首页 > 代码库 > Topcoder SRM 145

Topcoder SRM 145

Div2 500 ExerciseMachine

题意:略

题解:略

(水题吧。。

#line 2 "ExerciseMachine.cpp"#include<bits/stdc++.h>using namespace std;typedef long long LL;class ExerciseMachine{    public:    int getPercentages(string time)    {        int h=(time[0]-0)*10+(time[1]-0);        int m=(time[3]-0)*10+(time[4]-0);        int s=(time[6]-0)*10+(time[7]-0);        int T=h*60*60+m*60+s;        int cnt=0;        for (int i=1;i<=99;++i)        {            int x=i*T;            if (x%100==0) ++cnt;        }        return cnt;    }};#ifdef exint main(){    #ifdef ex1    freopen ("in.txt","r",stdin);    #endif}#endif

 

Topcoder SRM 145