麻花蘸豆浆
麻花蘸豆浆
全部文章
分类
题解(30)
归档
标签
去牛客网
登录
/
注册
麻花蘸豆浆的博客
全部文章
(共29篇)
牛牛学数列6
include<stdio.h> main(){int n,m,f1=1,f2=1,f;scanf("%d",&n);if(n<3){printf("%d",f1);} else {for(m=2;m<n;m++) {f=f1+f2; f1=f2; f2=f;}...
2020-02-10
1
1039
牛牛学数列5
include<stdio.h> main(){int n,m,f1=1,f2=1,f;scanf("%d",&n);if(n<3){printf("%d",f1);} else {for(m=2;m<n;m++) {f=f1+f2; f1=f2; f2=f;}...
2020-02-10
9
805
牛牛学数列4
include<stdio.h> main(){int n,m,k=0,sum=0;scanf("%d",&n);for(m=1;m<=n;m++){k+=m;sum+=k;}printf("%d",sum);}
2020-02-10
2
695
牛牛学数列3
include<stdio.h> main() {int n,i,k=1,sum=0,sign=1; double m=0.0; scanf("%d",&n); for(i=1;i<=n;i++) {sum=sum+sign*(2*k-1); m+=1.0...
2020-02-10
1
695
用sign控制每轮循环中i的符号变化
#include<stdio.h> main() {int n,i,sign=1,sum=0; scanf("%d",&n); for(i=1;i<=n;i++) {sum=sum+sign*i; sign*=-1;} printf("%d",sum);}
2020-02-09
4
959
最大值最小值
include<stdio.h> int main(){ int a[3],max=0,min=1000000; for(int i=0;i<3;i++){ scanf("%d",&a[i]); } for(int i=0;i<3...
2020-02-09
4
676
吃瓜群众
include<stdio.h> main(){int weight;scanf("%d",&weight);if(weight%2==0&&weight>2)printf("YES, you can divide the watermelon into t...
2020-02-09
0
649
判断闰年
include<stdio.h> main(){int n;scanf("%d",&n);if(n%4==0&&n%100!=0||n%400==0)printf("yes");elseprintf("no");}
2020-02-09
0
580
牛可乐数
include<stdio.h> main(){int n;scanf("%d",&n);if(n%2==0||n>50)printf("yes");elseprintf("no");}
2020-02-09
0
516
一大一小
include<stdio.h> main(){int x,y,t;scanf("%d%d",&x,&y);if(x<y){t=x;x=y;y=t;}printf("%d\n%d",x,y);}
2020-02-08
1
565
首页
上一页
1
2
3
下一页
末页