码迷,mamicode.com
首页 > 其他好文 > 详细

Topcoder SRM 145

时间:2016-09-02 23:16:00      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:

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 ex
int main()
{
    #ifdef ex1
    freopen ("in.txt","r",stdin);
    #endif

}
#endif

 

Topcoder SRM 145

标签:

原文地址:http://www.cnblogs.com/123-123/p/5835922.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!