codeforces682A

题目:http://codeforces.com/problemset/problem/682/A

理解: 比较简单的一道题 思路很重要

#include<iostream>//*****连续的****
using namespace std;
int main()
{
    int n,m;
    while(cin>>n>>m)
    {
        long long  int ans=0;
        for(int i=1; i<=n; i++)
        {
            ans+=(i+m)/5;//和最大
            if(i>=5)ans-=i/5;//i>5 则多算了加数以下得
          }
        cout<<ans<<endl;
    }
    return 0;
}
原文地址:https://www.cnblogs.com/sxy-798013203/p/5804314.html