摘要:
题目56阶乘因式分解(一)时间限制:3000 ms | 内存限制:65535 KB难度:2描述给定两个数m,n,其中m是一个素数。将n(0//#includeint main(){ int test,m,n; scanf("%d",&test); while(test--){ int i,k,s=0; scanf("%d %d",&n,&m); for(i=m;i<=n;i++){ k=i; while(!(k%m)){ k=k/m; s++; } } printf("%d\n",s); } // sys 阅读全文
摘要:
/*暴力因式分解*/#include #include #defineN10000 intcnt[N];boolprime[N];voidPrim(){memset(prime,false,sizeof(prime));prime[1]=true;inti,j;for(i=2;i#include#define N 10000int cnt[N];bool prime[N];void Prim(){ memset(prime,false,sizeof(prime)); prime[1] = true; int i,j; for(i=2;iint main(){ int i,j,k,m,n,s; 阅读全文
摘要:
题目463九九乘法表时间限制:1000 ms | 内存限制:65535 KB难度:1描述小时候学过的九九乘法表也许将会扎根于我们一生的记忆,现在让我们重温那些温暖的记忆,请编程输出九九乘法表.现在要求你输出它的格式与平常的 不同啊! 是那种反过来的三角形啦,具体如下图:每两个式子之前用一个空格 隔开。。。输入第一有一个整数N,表示有N组数据(N//#includeint main(){ int m,test,i,j,k; scanf("%d",&test); while(test--){ scanf("%d",&m); for(i=1;i 阅读全文
摘要:
题目72Financial Management时间限制:3000 ms | 内存限制:65535 KB难度:1描述Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step 阅读全文