上一页 1 2 3 4 5 6 ··· 8 下一页

2010年8月15日

sicp 2.3-2.5 习题

摘要: 2.53(a b c)((george))((y1 y2))(y1 y2)#f#f(red shoes blue socks)2.54(define (equal? list1 list2) (cond ((or(null? list1)(null? list2))... 阅读全文

posted @ 2010-08-15 13:53 草头菜 阅读(131) 评论(0) 推荐(0) 编辑

2010年8月6日

sicp 2.2 习题

摘要: in drscheme '()=nil2.17(define (last-pair l) (if(equal? (cdr l) '()) (car l) (last-pair (cdr l))))2.18(define (reverse l) (d... 阅读全文

posted @ 2010-08-06 19:18 草头菜 阅读(128) 评论(0) 推荐(0) 编辑

2010年8月2日

SICP 第二章第一节 习题 2.1-2.16

摘要: 2.1(define (make-rat n d) (let ((abs-n (abs n)) (abs-d (abs d)) (g (gcd (abs n) (abs d)))) (if (positive? (* n d)) ... 阅读全文

posted @ 2010-08-02 10:50 草头菜 阅读(184) 评论(0) 推荐(0) 编辑

2010年7月30日

sicp 第一章 习题

摘要: 1.1101283619#f4166161.2(/ (+ 5 4 (- 2 (- 3 (+ 6 (/ 1 3)))))(* 3 (- 6 2)(- 2 7)))1.3(define (sum x y z) (+ (square(larger x y))(square... 阅读全文

posted @ 2010-07-30 22:11 草头菜 阅读(132) 评论(0) 推荐(0) 编辑

2010年7月18日

hdu 1406

摘要: #includeint perfect(int n){ int i,sum; sum=0; for(i=1;ib) { t=a; a=b; b=t; } for(i=a;i<=b;i++) if(perfect(i)) count++; ... 阅读全文

posted @ 2010-07-18 18:03 草头菜 阅读(151) 评论(0) 推荐(0) 编辑

hdu 1161

摘要: #includeint main(){ int i; char str[200]; while(gets(str)) { for(i=0;str[i]!='/0';i++) { if(str[i]>='A'&&str[i]<='Z') str[i]+=3... 阅读全文

posted @ 2010-07-18 16:54 草头菜 阅读(108) 评论(0) 推荐(0) 编辑

hdu 1096

摘要: #includeint main(){ int m,a,i,n,sum; scanf("%d",&m); while(m--) { scanf("%d",&n); sum=0; for(i=0;i<n;i++) { scanf("%d",&a); su... 阅读全文

posted @ 2010-07-18 16:48 草头菜 阅读(100) 评论(0) 推荐(0) 编辑

hdu 1095

摘要: #includeint main(){ int a,b,i,n,sum; while(scanf("%d%d",&a,&b)!=EOF) { sum=a+b; printf("%d/n/n",sum); }} 阅读全文

posted @ 2010-07-18 16:45 草头菜 阅读(91) 评论(0) 推荐(0) 编辑

hdu 1094

摘要: #includeint main(){ int a,i,n,sum; while(scanf("%d",&n)!=EOF) { sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; } printf("%... 阅读全文

posted @ 2010-07-18 16:43 草头菜 阅读(100) 评论(0) 推荐(0) 编辑

hdu 1093

摘要: #includeint main(){ int m, a,i,n,sum; scanf("%d",&m); while(m--) { scanf("%d",&n); sum=0; for(i=0;i<n;i++) { scanf("%d",&a); s... 阅读全文

posted @ 2010-07-18 16:41 草头菜 阅读(86) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 8 下一页

导航