首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

nyoj 稍具技能的题

2012-08-21 
nyoj 稍具技巧的题韩信点兵 nyoj 34这题可以用中国剩余定理(这个我不会),我用的只是从1到105逐个搜索#incl

nyoj 稍具技巧的题

韩信点兵 nyoj 34

这题可以用中国剩余定理(这个我不会),我用的只是从1到105逐个搜索

#include<iostream>#include<cstdio>using namespace std;int main(){    long long int n, m;    scanf("%lld", &n);    while(n--)    {              scanf("%lld", &m);              printf("%lld\n", (m-1)*1000+471);    }    return 0;}

0


热点排行