码迷,mamicode.com
首页 >  
搜索关键字:nyoj 757    ( 1822个结果
nyoj 数的长度
描述 N!阶乘是一个非常大的数,大家都知道计算公式是N!=N*(N-1)······*2*1.现在你的任务是计算出N!的位数有多少(十进制)? #include <iostream>#include <cmath> using namespace std; int main(){ int n; ci ...
分类:其他好文   时间:2018-03-27 22:01:14    阅读次数:164
nyoj 还是回文
还是回文 时间限制:2000 ms | 内存限制:65535 KB 难度:3 描述 判断回文串很简单,把字符串变成回文串也不难。现在我们增加点难度,给出一串字符(全部是小写字母),添加或删除一个字符,都会产生一定的花费。那么,将字符串变成回文串的最小花费是多少呢? 输入 多组数据 第一个有两个数n, ...
分类:其他好文   时间:2018-03-27 02:02:21    阅读次数:214
nyoj 正数性质
整数性质 时间限制:500 ms | 内存限制:65535 KB 难度:1 整数性质 时间限制:500 ms | 内存限制:65535 KB 难度:1 我们知道,在数学中,对于任意两个正整数a和b,必定存在一对整数s、t使得sa+tb=gcd(a,b)。 运用欧几里得定理求得的才是正确答案。 htt ...
分类:其他好文   时间:2018-03-26 00:36:50    阅读次数:190
nyoj 苹果
苹果 时间限制:3000 ms | 内存限制:65535 KB 难度:3 苹果 时间限制:3000 ms | 内存限制:65535 KB 难度:3 ctest有n个苹果,要将它放入容量为v的背包。给出第i个苹果的大小和价钱,求出能放入背包的苹果的总价钱最大值。 #include <iostream> ...
分类:移动开发   时间:2018-03-24 15:42:59    阅读次数:205
nyoj 邮票分你一半
邮票分你一半 时间限制:1000 ms | 内存限制:65535 KB 难度:3 邮票分你一半 时间限制:1000 ms | 内存限制:65535 KB 难度:3 #include <iostream>using namespace std; int a[1002],mid,m,Max;//每个邮票 ...
分类:其他好文   时间:2018-03-15 13:17:14    阅读次数:146
nyoj 阶乘0
阶乘的0 时间限制:3000 ms | 内存限制:65535 KB 难度:3 阶乘的0 时间限制:3000 ms | 内存限制:65535 KB 难度:3 #include<iostream> using namespace std; int main() { int n,m; cin>>n; wh ...
分类:其他好文   时间:2018-03-14 23:40:08    阅读次数:216
nyoj 回文字符串
回文字符串 时间限制:3000 ms | 内存限制:65535 KB 难度:4 回文字符串 时间限制:3000 ms | 内存限制:65535 KB 难度:4 #include <iostream>#include <cstring>using namespace std; int dp[1005] ...
分类:其他好文   时间:2018-03-13 00:52:46    阅读次数:198
nyoj 公约数和公倍数
公约数和公倍数 时间限制:1000 ms | 内存限制:65535 KB 难度:1 公约数和公倍数 时间限制:1000 ms | 内存限制:65535 KB 难度:1 #include <iostream>using namespace std; int gcd(int x,int y){ if(y ...
分类:其他好文   时间:2018-03-11 21:09:07    阅读次数:160
nyoj 孪生素数
孪生素数问题 时间限制:3000 ms | 内存限制:65535 KB 难度:3 孪生素数问题 时间限制:3000 ms | 内存限制:65535 KB 难度:3 #include <iostream>using namespace std; int a[10000003]; //把m之前的素数保存 ...
分类:其他好文   时间:2018-03-11 19:25:18    阅读次数:309
nyoj 疯牛
疯牛 时间限制:1000 ms | 内存限制:65535 KB 难度:4 疯牛 时间限制:1000 ms | 内存限制:65535 KB 难度:4 #include <iostream>#include <algorithm>using namespace std; long long a[1000 ...
分类:其他好文   时间:2018-03-11 17:22:25    阅读次数:152
1822条   上一页 1 ... 13 14 15 16 17 ... 183 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!