题解列表

筛选

1014: [编程入门]阶乘求和

摘要:解题思路:注意事项:注意溢出参考代码:(小白求解)下面代码不能通过,错误50#include<stdio.h>int main(){    int n,j,i=1;    long int S=0; ……

1019数组解法

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int fun(int n){  int a[4],i;    while(n!=0)    {……

筛选N以内的素数,简单优化过的算法

摘要:解题思路:此算法进行了简单的优化,只找n以内的奇数,并且验证一个数i是否为素数时用i%j(j=2,3,4…,i/2)。(实际上只需增加到i的平方根,因为如果i能拆成两个整数的积,通常这两个整数位于i的……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int x,y; scanf("%d",&x); if(x>=1) if(x<10) y=2*x-1; ……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; while(~scanf("%d%d",&a,&b)) printf("%d\n",a+b)……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char c1,c2,c3,c4,c5; scanf("%c%c%c%c%c",&c1,&c2,&c3,&c4……

简单代码易理解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ double a; scanf("%lf",&a); printf("%f\n%.5f\n%e\n%g",a,……