您的位置:首页 > 其它

FZU 2104 Floor problem

2013-11-26 19:26 239 查看
题意:求向下取整的和
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

int n,L,R;

int main(){
    int t;
    scanf("%d",&t);
    while (t--){
        scanf("%d%d%d",&n,&L,&R);
        int sum = 0;
        for (int i = L; i <= R; i++)
            sum += n/i;
        printf("%d\n",sum);
    }
    return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: