- 博客(21)
- 收藏
- 关注
转载 HDU_ACM 2021 发工资咯:)
发工资咯:)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26415 Accepted Submission(s): 14872Problem Description作为杭电的老师,最盼望的日子就是每
2013-12-17 16:25:01 488
转载 HDU_ACM 2020 绝对值排序
绝对值排序Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34783 Accepted Submission(s): 16981Problem Description输入n(n In
2013-12-16 23:39:04 466
转载 HDU_ACM 2019 数列有序!
数列有序!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39412 Accepted Submission(s): 16911Problem Description有n(n Inp
2013-12-16 23:22:50 575
原创 HDU_ACM 2015 偶数求和
Problem Description有一个长度为n(n Input输入数据有多组,每组占一行,包含两个正整数n和m,n和m的含义如上所述。 Output对于每组输入数据,输出一个平均值序列,每组输出占一行。 Sample Input3 24 2 Sample Output
2013-12-10 00:28:23 387
转载 ACM What is it?
Problem DescriptionAlice is a pupil and likes natural numbers very much. But she only know 1,2,...,100. Now she meet a problem. The problem is described like this: I delete the square numbers(1,4,
2013-12-09 01:14:14 411
转载 ACM The value of poetry
Problem Description"When I was down beside the sea, A wooden spade they gave to meTo dig the sandy shoreThe holes were empty like a cup ... "Bob is a little boy who began to study englis
2013-12-09 00:08:45 450
转载 ACM Pyramid
Problem DescriptionThe pyramid is made up of many rectangular stones. The upstairs stone can only put on the center of four downstairs stones. Can you tell me how many stones on the top of pyram
2013-12-09 00:02:37 428
转载 ACM 租房子
Problem DescriptionJfx已经大四,马上准备去实习了,可是如果住在学校天天挤公交车真的是很操蛋的一件事——所以,jfx决定租房子住。但是可选择的房子太多了,而且jfx有自己的癖好,所以现在jfx请你帮他选择哪个或者哪几个房子是他想要租的。Jfx租房考虑3个因素:租金,房间大小,新旧程度。对于租金,jfx只考虑1000以下(包括1000)的,以1000为基准,每
2013-12-08 23:52:17 283
转载 ACM_Just multiply it
#include#includemain(){ int n, i, j, k, x; __int64 y; while(scanf("%d",&k)!=EOF) { for(j=0;j<k;j++) { y=1; scanf("%d",&n); x=(int)sqrt(n); if((double)x==sqrt(n))/*如果n为完全平方数,那么输
2013-12-08 23:29:52 356
转载 ACM_HDU 2014 青年歌手大奖赛_评委会打分
#includemain(){ int n,i,j; double a[100],k,term,sum; while(scanf("%d",&n)!=EOF) { term=0; for(i=0;i<n;i++) { scanf("%lf",&a[i]); term+=a[i]; } for(j=0;j<n-1;j++)
2013-12-03 16:42:33 325
转载 HDU_ACM 2012 判定素数
#include#includeint main(){ int x,y,n,k,i,j; while(scanf("%d%d",&x,&y)!=EOF) { if(x==0&&y==0) break; else { for(i=x,k=1;i<=y;i++) { n=i*i+i+41; for(j=2;j<sqrt((double)n
2013-12-02 23:17:56 350
原创 HDU_ACM 2011 多项式求和
#include#includemain(){ int k,n,i; double s; while(scanf("%d",&k) != EOF) { while(k--) { s = 0; scanf("%d",&n); for(i = 1;i <= n;i++) { s += pow(-
2013-12-02 11:38:08 366
转载 HDU_ACM 2010 水仙花数
#include int main(){ int m,n,a,b,c,d; while(scanf("%d %d",&m,&n)!=EOF) { d=0; while(m<=n) { a=m%10; b=(m%100)/10; c=m/100; if(a*a*a+b*b*b+c*c*c==m)
2013-12-02 10:59:54 323
转载 HDU_ACM 2006 奇数的乘积
#includemain(){ int i,n,t,r; while (scanf("%d", &n)!= EOF) { r = 1; for (i = 0; i < n; ++i) { scanf ("%d", &t); if ((t & 1) == 1) /*按位运算符*/ r *= t; }
2013-11-28 01:02:01 351
转载 HDU_ACM 2005 第几天?
#includeint main(){ int n, y, m, d, a[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(scanf("%d/%d/%d", &y, &m, &d) != EOF) { n = 0; if (m > 2 && ((y % 400 == 0)
2013-11-27 00:23:56 409
原创 HDU_ACM 2000 ASCII码排序
#include #include using namespace std;int main(int argc, char *argv[]){char a[4];while(scanf("%s",a)!=EOF){if(a[0]>a[1]) swap(a[0],a[1]);if(a[0]>a[2]) swap(a[0],a[2]);if(a[1]>a
2013-11-26 23:41:34 293
转载 C语言中数组几种输入法的区别
如:chat a[5]; int i;法一:for(i=0;i<5;i++) a[i]=getchar();法二:gets(a);法三:scanf("%s",a);输入:abc dsdadsa那种能满足定义的数组只取前5个字符-abc d这三种输入法的利弊1.for循环输入缺点:1.)不能通过getchar()从键盘上获得字符'\0',所以如果你想输入的是字符串,处
2013-11-26 23:22:53 371
转载 杭电ACM A+B for Input-Output Practice (VIII)
两种方法第一种:#includeint main(){ int N; scanf("%d",&N); while(N--) { int M,i,a,sum=0; scanf("%d",&M); for(i=0;iM;i++) { scanf
2013-11-25 23:39:38 458
原创 杭电ACM 1089 ( A+B for Input-Output Practice (I~V) C语言
第一个#includemain(){int a,b;while(scanf("%d%d",&a,&b)!=EOF)printf("%d\n",a+b);}第二个#includemain(){ int n,a,b,i; scanf("%d",&n); for(i = 0;i n;i++) { scanf("%d%d
2013-11-25 23:20:47 650
转载 杭电 1094 A+B for Input-Output Practice (VI) 用while实现循环
#include main(){int n,s,t;while (scanf("%d",&n) != EOF) { s = 0; while (n-- != 0) /*用while实现循环*/ { scanf("%d", &t); s += t; } printf("%d\n",s);}return
2013-11-25 23:11:38 349
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人