2015年5月12日

由于期中考好久没A了

摘要: #include "stdio.h"#include "string.h"int main(){char str[1000];int n,m,i,t,j;while(scanf("%d\n",&m)!=EOF){for(j=0;j='0'&&str[i]int main(){ int n,i,k=0... 阅读全文

posted @ 2015-05-12 18:22 Randy77 阅读(133) 评论(0) 推荐(0) 编辑

2015年4月28日

随着课上下去,题目越来越难了

摘要: No.1#include #includeint main(){int a[50],i;for(i=0;i#includelib.h>int main(){int a[50],i,j,k=0,t,v,n; scanf("%d\n",&n);for(i=0;ia[i+1]) { t=a[i]; a[... 阅读全文

posted @ 2015-04-28 18:00 Randy77 阅读(143) 评论(0) 推荐(0) 编辑

编了2个题都不对,求提高的方法

摘要: 随机产生12个5~15之间的整数放入一堆数组中,然后将这些整数输出,每行输出4个数 #include int main() { int a[12],i,j; for(i=0;imain(){int a,i,j,n,b,s[120];for(i=0;iint main(){ int a[50],i... 阅读全文

posted @ 2015-04-28 09:13 Randy77 阅读(184) 评论(0) 推荐(0) 编辑

2015年4月22日

循环与括号(上课时的未解之谜)

摘要: c语言书P86 数组上课看到书86上的题#includeint main(){ int s[10]; int i; for(i=0;iint main(){ int s[10]; int i; for(i=0;iint main(){ int s[10]; int i; for(i=0;i<=9;i... 阅读全文

posted @ 2015-04-22 22:25 Randy77 阅读(128) 评论(0) 推荐(0) 编辑

杭电2010(论空格的重要性)

摘要: 花了半个小时打代码,考虑;最后的调试过程中,却在考虑空格(space)应该加在哪里我也是醉了,一个一个试过去,一次一次运行,一次一次显示表示错误......没基础真可怕 //请看误解 你能体验到那种痛苦,无奈吗!!!虚心请教真的好吗...重点if(j>0)printf(" %d",i);elsepr... 阅读全文

posted @ 2015-04-22 20:24 Randy77 阅读(118) 评论(0) 推荐(0) 编辑

杭电(存一寸光阴,换一个世纪)

摘要: 开始的错误答案,看了一个小时才发现哪里错了我也是醉了。(请注意循环后要清0,上了不止一次当了)#include#includeint main(){ int n,m,i,j,sum=0,num=0; while(scanf("%d %d",&n,&m)!=EOF) { if(n#includei... 阅读全文

posted @ 2015-04-22 19:17 Randy77 阅读(140) 评论(0) 推荐(0) 编辑

2015年4月20日

杭电2004(万一实现了呢)

摘要: #includeint main(){int t; while(scanf("%d",&t)!=EOF) {while(1) { if(t>100 || t=90) {printf("A\n"); break; } else if(t>=80) {printf("B\n"); br... 阅读全文

posted @ 2015-04-20 21:51 Randy77 阅读(218) 评论(0) 推荐(0) 编辑

杭电2001(梦想还是要有的)

摘要: #include#includeint main(){ double x1,y1,x2,y2,l,a; while(scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2)!=EOF) { a=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2); ... 阅读全文

posted @ 2015-04-20 21:12 Randy77 阅读(155) 评论(0) 推荐(0) 编辑

杭电2002(我们没有什么不同)

摘要: #include#include#define PI 3.1415927int main(){ double v,r; while(scanf("%lf",&r)!=EOF) { v=r*r*r*PI*4/3; printf("%.3lf\n",v); } } 阅读全文

posted @ 2015-04-20 21:11 Randy77 阅读(134) 评论(0) 推荐(0) 编辑

杭电1093(不会做)

摘要: Problem DescriptionYour task is to calculate the sum of some integers. InputInput contains an integer N in the first line, and then N lines follow. Ea... 阅读全文

posted @ 2015-04-20 19:56 Randy77 阅读(379) 评论(0) 推荐(0) 编辑

导航