게시판 인덱스

 
 FAQFAQ   검색검색   멤버리스트멤버리스트   사용자 그룹사용자 그룹   사용자 등록하기사용자 등록하기 
 개인 정보개인 정보   비공개 메시지를 확인하려면 로그인하십시오비공개 메시지를 확인하려면 로그인하십시오   로그인로그인 

아직 숙제를 하고 계신 분들 중에

 
이 게시판은 잠겼으므로 글을 올리거나, 답변을 하거나 수정을 할 수 없습니다   이 주제는 잠겼으므로 답변을 하거나 수정을 할 수 없습니다     게시판 인덱스 -> 4190.210 Principles of Programming (Spring 2007)
이전 주제 보기 :: 다음 주제 보기  
글쓴이 메시지
김재왕



가입: 2007년 3월 31일
올린 글: 10

올리기올려짐: 2007년4월2일 19:35    주제: 아직 숙제를 하고 계신 분들 중에 인용과 함께 답변

자신이 푼 문제가 제대로 동작하는 지 확인하고 싶으신 분들을 위해서
제가 디버깅을 위해 사용했던 예제를 올릴까 합니다;
(사실 제가 짠게 제대로 동작하는 건지 자신이 없어서 다른 분들과
수행결과를 맞춰보고자 하는 속셈이;; )

1번 문제의 경우는 2번 3번 예제가 정확히 수행된다면 특별히 다른
예가 필요 없을 것 같아서 생략했고,
3번문제의 예제는 2번 문제를 필요로 하고
5번 문제의 예제는 4번 문제를 필요로 합니다.
5번 문제의 경우 제출 시에도 4번 문제를 포함하도록 되어 있으니
수행에 문제가 없겠지만;
3번 문제의 경우 2번 문제를 한 파일에 놔둬야만 예제가 제대로 동작 할
거라 생각합니다;

(+ (crazy2val '(p p z z p z n ))(crazy2val '(p z p n n n n p n z z n p p )))
(crazy2val (crazy2add '(p p z z p z n ) '(p z p n n n n p n z z n p p )))
(+ (crazy2val '(p n n z p z z n p n p n n p ))(crazy2val '(z p )))
(crazy2val (crazy2add '(p n n z p z z n p n p n n p ) '(z p )))
(+ (crazy2val '(n ))(crazy2val '(p n )))
(crazy2val (crazy2add '(n ) '(p n )))
(+ (crazy2val '(p n n p n p z ))(crazy2val '(p p z n n p )))
(crazy2val (crazy2add '(p n n p n p z ) '(p p z n n p )))
(+ (crazy2val '(p z p z n z z z n p ))(crazy2val '(n p p z p p n )))
(crazy2val (crazy2add '(p z p z n z z z n p ) '(n p p z p p n )))
(+ (crazy2val '())(crazy2val '(n n n n z z n p z n p n p )))
(crazy2val (crazy2add '() '(n n n n z z n p z n p n p )))
(+ (crazy2val '(n z ))(crazy2val '(p z n p z n p z p n z n n z n )))
(crazy2val (crazy2add '(n z ) '(p z n p z n p z p n z n n z n )))
(+ (crazy2val '(p n n n n p p p ))(crazy2val '(z p p z p p )))
(crazy2val (crazy2add '(p n n n n p p p ) '(z p p z p p )))
(+ (crazy2val '(z p p p z n n n p n ))(crazy2val '(n z p p p p p n z )))
(crazy2val (crazy2add '(z p p p z n n n p n ) '(n z p p p p p n z )))
(+ (crazy2val '(p z z z n n z p p n p p p n z ))(crazy2val '(n )))
(crazy2val (crazy2add '(p z z z n n z p p n p p p n z ) '(n )))
(+ (crazy2val '(z ))(crazy2val '(z p z p p p )))
(crazy2val (crazy2add '(z ) '(z p z p p p )))
(+ (crazy2val '(n z z z n p ))(crazy2val '(n n p n p p n z n z p p p z p )))
(crazy2val (crazy2add '(n z z z n p ) '(n n p n p p n z n z p p p z p )))
(+ (crazy2val '(p z p z p n n ))(crazy2val '(p z p p )))
(crazy2val (crazy2add '(p z p z p n n ) '(p z p p )))
(+ (crazy2val '(z p p n z n n p n p p z ))(crazy2val '(z p p n p p z z p z p p p z )))
(crazy2val (crazy2add '(z p p n z n n p n p p z ) '(z p p n p p z z p z p p p z )))
(+ (crazy2val '(z n p z p z p z z p z n ))(crazy2val '(n p z z n )))
(crazy2val (crazy2add '(z n p z p z p z z p z n ) '(n p z z n )))
(+ (crazy2val '(z ))(crazy2val '()))
(crazy2val (crazy2add '(z ) '()))
(+ (crazy2val '(n ))(crazy2val '(n n z p z z p n )))
(crazy2val (crazy2add '(n ) '(n n z p z z p n )))
(+ (crazy2val '(z n z n z ))(crazy2val '(z n n z n )))
(crazy2val (crazy2add '(z n z n z ) '(z n n z n )))
(+ (crazy2val '(z z n p p ))(crazy2val '(p p z p n z p n p n z z n n )))
(crazy2val (crazy2add '(z z n p p ) '(p p z p n z p n p n z z n n )))
(+ (crazy2val '(n p z z n z z n ))(crazy2val '(z p n p n z n z n p p )))
(crazy2val (crazy2add '(n p z z n z z n ) '(z p n p n z n z n p p )))
(+ (crazy2val '(n z p z p p p z ))(crazy2val '(z p z n n )))
(crazy2val (crazy2add '(n z p z p p p z ) '(z p z n n )))
(+ (crazy2val '(z z n z n z n n p n z ))(crazy2val '(z n p n )))
(crazy2val (crazy2add '(z z n z n z n n p n z ) '(z n p n )))
(+ (crazy2val '(z n n z p n n p p z ))(crazy2val '(n p n p n z p n z n p z n n z )))
(crazy2val (crazy2add '(z n n z p n n p p z ) '(n p n p n z p n z n p z n n z )))
(+ (crazy2val '(n z z p p p p p p n p z p ))(crazy2val '(p n n z p z n z n n z p z z n )))
(crazy2val (crazy2add '(n z z p p p p p p n p z p ) '(p n n z p z n z n n z p z z n )))
(+ (crazy2val '(p p p p p n z n n n n z ))(crazy2val '(z z p p p p n p p z n )))
(crazy2val (crazy2add '(p p p p p n z n n n n z ) '(z z p p p p n p p z n )))
(+ (crazy2val '(n p p n p n z n z z n p z z ))(crazy2val '(n p p z z n p z z p p n )))
(crazy2val (crazy2add '(n p p n p n z n z z n p z z ) '(n p p z z n p z z p p n )))
(+ (crazy2val '(n z p p z n z n z z z n p ))(crazy2val '(p z n n z p z z p n )))
(crazy2val (crazy2add '(n z p p z n z n z z z n p ) '(p z n n z p z z p n )))
(+ (crazy2val '(z n z z n n p n z p n n z p p ))(crazy2val '(n z n p z z z z p n z p )))
(crazy2val (crazy2add '(z n z z n n p n z p n n z p p ) '(n z n p z z z z p n z p )))
(+ (crazy2val '(n p z n z n z n p n p p n ))(crazy2val '(n n p z n n z p p n )))
(crazy2val (crazy2add '(n p z n z n z n p n p p n ) '(n n p z n n z p p n )))
(+ (crazy2val '(n n z z p z n n z n z n n p n ))(crazy2val '(n n n n n p p p z p z z n )))
(crazy2val (crazy2add '(n n z z p z n n z n z n n p n ) '(n n n n n p p p z p z z n )))
(+ (crazy2val '(z p z p n p z n z n z n ))(crazy2val '(n z p z n z z p n p z p n )))
(crazy2val (crazy2add '(z p z p n p z n z n z n ) '(n z p z n z z p n p z p n )))
(+ (crazy2val '(n n n z n p n n n z n z n p ))(crazy2val '(n )))
(crazy2val (crazy2add '(n n n z n p n n n z n z n p ) '(n )))
(+ (crazy2val '(n z n z z n n z n z p ))(crazy2val '(p n )))
(crazy2val (crazy2add '(n z n z z n n z n z p ) '(p n )))
(+ (crazy2val '(p p p z p p n n z p n n ))(crazy2val '(z z p p z n p p )))
(crazy2val (crazy2add '(p p p z p p n n z p n n ) '(z z p p z n p p )))
(+ (crazy2val '(n n z n z n z n p ))(crazy2val '(n p p n p z z z p z )))
(crazy2val (crazy2add '(n n z n z n z n p ) '(n p p n p z z z p z )))
(+ (crazy2val '(n z p n p n z n n ))(crazy2val '()))
(crazy2val (crazy2add '(n z p n p n z n n ) '()))
(+ (crazy2val '(z n n z n n ))(crazy2val '(z n z )))
(crazy2val (crazy2add '(z n n z n n ) '(z n z )))
(+ (crazy2val '(z z n n z n ))(crazy2val '(n n n n n z n p z z n )))
(crazy2val (crazy2add '(z z n n z n ) '(n n n n n z n p z z n )))
(+ (crazy2val '(z p ))(crazy2val '(p z n n n n n p z n z p n n p )))
(crazy2val (crazy2add '(z p ) '(p z n n n n n p z n z p n n p )))
(+ (crazy2val '(n p ))(crazy2val '(z z p z p n p z )))
(crazy2val (crazy2add '(n p ) '(z z p z p n p z )))
(+ (crazy2val '(z z z n p n z n n n n z p n ))(crazy2val '(z n z z p p z p p z p p z )))
(crazy2val (crazy2add '(z z z n p n z n n n n z p n ) '(z n z z p p z p p z p p z )))
(+ (crazy2val '(z z z n n p z n p p p n n ))(crazy2val '(p z p p n z p )))
(crazy2val (crazy2add '(z z z n n p z n p p p n n ) '(p z p p n z p )))
(+ (crazy2val '(z p n p n p n n n ))(crazy2val '(p z z n n p n p n n p p z n )))
(crazy2val (crazy2add '(z p n p n p n n n ) '(p z z n n p n p n n p p z n )))
(+ (crazy2val '(n z n n p p p z ))(crazy2val '(p z p n p z p z z )))
(crazy2val (crazy2add '(n z n n p p p z ) '(p z p n p z p z z )))
(+ (crazy2val '(p p p ))(crazy2val '()))
(crazy2val (crazy2add '(p p p ) '()))
(+ (crazy2val '(z p ))(crazy2val '(z z z n n z z p n p z z )))
(crazy2val (crazy2add '(z p ) '(z z z n n z z p n p z z )))
(+ (crazy2val '(p n n p n p n p n n n p ))(crazy2val '(p z n n p )))
(crazy2val (crazy2add '(p n n p n p n p n n n p ) '(p z n n p )))
(+ (crazy2val '(z n n z z p p z n n n ))(crazy2val '(z p )))
(crazy2val (crazy2add '(z n n z z p p z n n n ) '(z p )))
(+ (crazy2val '(z n n p n ))(crazy2val '(p z p z n z n n z p n p )))
(crazy2val (crazy2add '(z n n p n ) '(p z p z n z n n z p n p )))
(+ (crazy2val '(n p z ))(crazy2val '(p z p p n n p p p p n )))
(crazy2val (crazy2add '(n p z ) '(p z p p n n p p p p n )))
(+ (crazy2val '(n p p z n p n p p p z n z ))(crazy2val '(z z z z n n )))
(crazy2val (crazy2add '(n p p z n p n p p p z n z ) '(z z z z n n )))
(+ (crazy2val '(n p p n z n n p z p ))(crazy2val '(p z p z z )))
(crazy2val (crazy2add '(n p p n z n n p z p ) '(p z p z z )))
(+ (crazy2val '(z n p z ))(crazy2val '(p )))
(crazy2val (crazy2add '(z n p z ) '(p )))
(+ (crazy2val '(n ))(crazy2val '(z z )))
(crazy2val (crazy2add '(n ) '(z z )))
(+ (crazy2val '(p z n n n p p z p n ))(crazy2val '(z z n z z n z p z p z p p z z )))
(crazy2val (crazy2add '(p z n n n p p z p n ) '(z z n z z n z p z p z p p z z )))
(+ (crazy2val '(n z p z z z n ))(crazy2val '(p )))
(crazy2val (crazy2add '(n z p z z z n ) '(p )))
(+ (crazy2val '())(crazy2val '(n n n z p n z z n z n z p z z )))
(crazy2val (crazy2add '() '(n n n z p n z z n z n z p z z )))
(+ (crazy2val '(p n z n n n p z n z p n ))(crazy2val '(n z )))
(crazy2val (crazy2add '(p n z n n n p z n z p n ) '(n z )))
(+ (crazy2val '(p p p n z ))(crazy2val '(z z )))
(crazy2val (crazy2add '(p p p n z ) '(z z )))
(+ (crazy2val '(z ))(crazy2val '(p n z n z n )))
(crazy2val (crazy2add '(z ) '(p n z n z n )))
(+ (crazy2val '(p p z z p n p n p ))(crazy2val '(n p n n z p )))
(crazy2val (crazy2add '(p p z z p n p n p ) '(n p n n z p )))
(+ (crazy2val '(p p n z p ))(crazy2val '(n z z z p z p p p p p )))
(crazy2val (crazy2add '(p p n z p ) '(n z z z p z p p p p p )))
(+ (crazy2val '(p z n n z n z z n n p n ))(crazy2val '(z n n n z p n n n z n z n )))
(crazy2val (crazy2add '(p z n n z n z z n n p n ) '(z n n n z p n n n z n z n )))
(+ (crazy2val '(p n p p n n z n ))(crazy2val '(n z n )))
(crazy2val (crazy2add '(p n p p n n z n ) '(n z n )))
(+ (crazy2val '(p z n n n p n z n p p z p z z ))(crazy2val '(n n n n z z )))
(crazy2val (crazy2add '(p z n n n p n z n p p z p z z ) '(n n n n z z )))
(+ (crazy2val '(z p n z n n p n n z ))(crazy2val '(z z p p p n z p n p p z n p )))
(crazy2val (crazy2add '(z p n z n n p n n z ) '(z z p p p n z p n p p z n p )))
(+ (crazy2val '(n ))(crazy2val '(n n )))
(crazy2val (crazy2add '(n ) '(n n )))
(+ (crazy2val '(p z p n z p n p n p z ))(crazy2val '(z z z n n n n n n z )))
(crazy2val (crazy2add '(p z p n z p n p n p z ) '(z z z n n n n n n z )))
(+ (crazy2val '(p z ))(crazy2val '(p p n z n p n n z z p p p z z )))
(crazy2val (crazy2add '(p z ) '(p p n z n p n n z z p p p z z )))
(+ (crazy2val '(n n p p p n n z p n z n ))(crazy2val '(p n p z p n p z n )))
(crazy2val (crazy2add '(n n p p p n n z p n z n ) '(p n p z p n p z n )))
(+ (crazy2val '(n n ))(crazy2val '(z n p p n p p z n p z n p z z )))
(crazy2val (crazy2add '(n n ) '(z n p p n p p z n p z n p z z )))
(+ (crazy2val '(z p n p p p n z z n z p ))(crazy2val '(n z p p n p z p z n )))
(crazy2val (crazy2add '(z p n p p p n z z n z p ) '(n z p p n p z p z n )))
(+ (crazy2val '(p n ))(crazy2val '(z )))
(crazy2val (crazy2add '(p n ) '(z )))
(+ (crazy2val '(n n n n z n z z z n n ))(crazy2val '(n p n p n z z z p z p n n )))
(crazy2val (crazy2add '(n n n n z n z z z n n ) '(n p n p n z z z p z p n n )))
(+ (crazy2val '(p ))(crazy2val '(z p p p z z )))
(crazy2val (crazy2add '(p ) '(z p p p z z )))
(+ (crazy2val '(z z n n n p p n p n ))(crazy2val '(z p z )))
(crazy2val (crazy2add '(z z n n n p p n p n ) '(z p z )))
(+ (crazy2val '(p p p z p p n z z z n p p n p ))(crazy2val '(p p n n z z n z n z p n )))
(crazy2val (crazy2add '(p p p z p p n z z z n p p n p ) '(p p n n z z n z n z p n )))
(+ (crazy2val '(n p z n z z p z ))(crazy2val '(z n n p n p z p z p )))
(crazy2val (crazy2add '(n p z n z z p z ) '(z n n p n p z p z p )))
(+ (crazy2val '(n n n z p z n z z p p p ))(crazy2val '(p z z n z )))
(crazy2val (crazy2add '(n n n z p z n z z p p p ) '(p z z n z )))
(+ (crazy2val '(n z z n n ))(crazy2val '(n z n z )))
(crazy2val (crazy2add '(n z z n n ) '(n z n z )))
(+ (crazy2val '(n n p p n z p z n ))(crazy2val '()))
(crazy2val (crazy2add '(n n p p n z p z n ) '()))
(+ (crazy2val '(z ))(crazy2val '(n )))
(crazy2val (crazy2add '(z ) '(n )))
(+ (crazy2val '(p z n n p ))(crazy2val '(z n z z p n z z z z p p z z )))
(crazy2val (crazy2add '(p z n n p ) '(z n z z p n z z z z p p z z )))
(+ (crazy2val '(p z n p n p z n z p n p ))(crazy2val '(z n z p p z z n p n z z z p p )))
(crazy2val (crazy2add '(p z n p n p z n z p n p ) '(z n z p p z z n p n z z z p p )))
(+ (crazy2val '())(crazy2val '(n p n n n n z p z z z n z )))
(crazy2val (crazy2add '() '(n p n n n n z p z z z n z )))
(+ (crazy2val '(z p n p z p n ))(crazy2val '()))
(crazy2val (crazy2add '(z p n p z p n ) '()))
(+ (crazy2val '(z z p z n p n z p n ))(crazy2val '(p p n p n z n n z p z z n z n )))
(crazy2val (crazy2add '(z z p z n p n z p n ) '(p p n p n z n n z p z z n z n )))
(+ (crazy2val '(p ))(crazy2val '(n n z )))
(crazy2val (crazy2add '(p ) '(n n z )))
(+ (crazy2val '(p n z n ))(crazy2val '(p n n )))
(crazy2val (crazy2add '(p n z n ) '(p n n )))
(+ (crazy2val '(p z n n p n n p p z ))(crazy2val '(p z n z p z n n )))
(crazy2val (crazy2add '(p z n n p n n p p z ) '(p z n z p z n n )))
(+ (crazy2val '(p n p z p z z p p p n p z ))(crazy2val '(z p p z n p p n n z )))
(crazy2val (crazy2add '(p n p z p z z p p p n p z ) '(z p p z n p p n n z )))
(+ (crazy2val '(p z p ))(crazy2val '()))
(crazy2val (crazy2add '(p z p ) '()))
(+ (crazy2val '(p p z p z ))(crazy2val '(z p )))
(crazy2val (crazy2add '(p p z p z ) '(z p )))
(+ (crazy2val '(z p p p z p n n n p p ))(crazy2val '(p n p z n n p n p )))
(crazy2val (crazy2add '(z p p p z p n n n p p ) '(p n p z n n p n p )))
(+ (crazy2val '(n z n n p z n n n p z z ))(crazy2val '(z p n p z p n z p z z p z )))
(crazy2val (crazy2add '(n z n n p z n n n p z z ) '(z p n p z p n z p z z p z )))
(+ (crazy2val '(p z ))(crazy2val '(z n p p n )))
(crazy2val (crazy2add '(p z ) '(z n p p n )))
(+ (crazy2val '(z n p ))(crazy2val '(z p n p z n p p z n )))
(crazy2val (crazy2add '(z n p ) '(z p n p z n p p z n )))
(+ (crazy2val '(n z p n z p n z ))(crazy2val '(n z n z )))
(crazy2val (crazy2add '(n z p n z p n z ) '(n z n z )))
(+ (crazy2val '(z p p p n n z n n ))(crazy2val '(z n z n p n z p z z )))
(crazy2val (crazy2add '(z p p p n n z n n ) '(z n z n p n z p z z )))
(+ (crazy2val '(p z n n n n z z n p p n p ))(crazy2val '(n p z n )))
(crazy2val (crazy2add '(p z n n n n z z n p p n p ) '(n p z n )))

위의 예제를 그대로 복사해서 definition window에 붙인 후 실행하면
아래의 결과를 얻습니다. 에; crazy2add가 제대로 작동한다면
위 아래의 값이 항상 같을 테고 crazy2val이 제가 짠 것과 같은
원리로 동작한다면 답으로 얻은 값이 아래에 보이는 것과 같을 겁니다;
(절대 아래에 보이는 것과 같이 출력되는게 정확하다는게 아닙니다; )

9952
9952
2701
2701
-2
-2
30
30
234
234
2609
2609
-22748
-22748
249
249
-471
-471
-1200
-1200
58
58
23288
23288
-62
-62
8780
8780
-1469
-1469
0
0
-60
-60
-32
-32
-12593
-12593
1063
1063
93
93
-474
-474
-11553
-11553
-10046
-10046
-2565
-2565
402
402
1664
1664
23697
23697
-1622
-1622
-18418
-18418
-4339
-4339
2632
2632
666
666
-2525
-2525
354
354
-405
-405
-56
-56
-1035
-1035
5639
5639
53
53
-2538
-2538
-4411
-4411
-6241
-6241
176
176
7
7
362
362
344
344
-1700
-1700
1319
1319
-98
-98
-1243
-1243
546
546
3
3
-1
-1
6561
6561
-60
-60
2793
2793
-1274
-1274
-1
-1
-41
-41
200
200
2014
2014
-7385
-7385
-170
-170
5302
5302
5130
5130
-4
-4
-155
-155
6992
6992
-2580
-2580
2391
2391
1169
1169
-1
-1
-6458
-6458
15
15
-314
-314
11950
11950
715
715
3522
3522
-30
-30
-199
-199
-1
-1
3059
3059
25643
25643
-1979
-1979
-26
-26
-20469
-20469
-2
-2
-14
-14
114
114
1641
1641
5
5
13
13
1281
1281
2345
2345
-5
-5
-344
-344
-42
-42
-316
-316
3262
3262

(define mobile1 (model 4))
(define mobile2 (model 7))
(define mobile3 (model 15))
(define mobile4 (model 3))
(define mobile5 (model 17))
(define mobile6 (model 11))
(define mobile7 (make-mobile (make-branch 7 mobile1) (make-branch 4 mobile2)))
(define mobile8 (make-mobile (make-branch 7 mobile1) (make-branch 3 mobile2)))
(define mobile9 (make-mobile (make-branch 11 mobile3) (make-branch 15 mobile7)))
(define mobile10 (make-mobile (make-branch 11 mobile3) (make-branch 15 mobile8)))
(define mobile11 (make-mobile (make-branch 11 mobile3) (make-branch 14 mobile7)))
(define mobile12 (make-mobile (make-branch 12 mobile3) (make-branch 15 mobile7)))
(define mobile13 (make-mobile (make-branch 11 mobile9) (make-branch 26 mobile6)))
(define mobile14 (make-mobile (make-branch 3 mobile13) (make-branch 37 mobile4)))
(define mobile15 (make-mobile (make-branch 4 mobile13) (make-branch 37 mobile4)))
(define mobile16 (make-mobile (make-branch 17 mobile14) (make-branch 40 mobile5)))
(define mobile17 (make-mobile (make-branch 17 mobile15) (make-branch 40 mobile5)))
(define mobile18 (make-mobile (make-branch 40 mobile16) (make-branch 57 mobile14)))
(define mobile19 (make-mobile (make-branch 40 mobile9) (make-branch 57 mobile14)))

(weight mobile1)
(weight mobile2)
(weight mobile3)
(weight mobile4)
(weight mobile5)
(weight mobile6)
(weight mobile7)
(weight mobile8)
(weight mobile9)
(weight mobile10)
(weight mobile11)
(weight mobile12)
(weight mobile13)
(weight mobile14)
(weight mobile15)
(weight mobile16)
(weight mobile17)
(weight mobile18)
(weight mobile19)
(is-balanced? mobile1)
(is-balanced? mobile2)
(is-balanced? mobile3)
(is-balanced? mobile4)
(is-balanced? mobile5)
(is-balanced? mobile6)
(is-balanced? mobile7)
(is-balanced? mobile8)
(is-balanced? mobile9)
(is-balanced? mobile10)
(is-balanced? mobile11)
(is-balanced? mobile12)
(is-balanced? mobile13)
(is-balanced? mobile14)
(is-balanced? mobile15)
(is-balanced? mobile16)
(is-balanced? mobile17)
(is-balanced? mobile18)
(is-balanced? mobile19)

에; 그러니까... 이건 3번 문제의 예제처럼 랜덤등을 이용해서
만든게 아니고 제가 수작업을 한거라서; 결과는 제가 엄청나게
멍청한 착각을 한게 아니라면 아래와 같이 나와야 할겁니다;

4
7
15
3
17
11
11
11
26
26
26
26
37
40
40
57
57
97
66
#t
#t
#t
#t
#t
#t
#t
#f
#t
#f
#f
#f
#t
#t
#f
#t
#f
#t
#f

그럼 부디 즐거운 디버깅 하시길 ^^
위로
사용자 정보 보기 비밀 메시지 보내기 이메일 보내기
장민석



가입: 2006년 9월 5일
올린 글: 165

올리기올려짐: 2007년4월3일 0:40    주제: 인용과 함께 답변

우와~ 어마어마한 테스트 셋이군요. 감사히 쓰겠습니다!

모빌은 저도 같은 결과가 나오네요 Smile


empty list를 이친수 0으로 취급하신 것 같은데, 숙제 스펙에 의하면 그것은 올바른 구현이 아닌 것 같습니다. 귀납적으로 정의된 2친수 집합을 살펴보면 nil은 그 집합에 속하지 않으니까요.

참, 코드를 올리실 때 Code 태그를 사용해 주시면 읽거나 복사하기가 더 좋은 것 같아요.
위로
사용자 정보 보기 비밀 메시지 보내기
김재왕



가입: 2007년 3월 31일
올린 글: 10

올리기올려짐: 2007년4월3일 10:16    주제: 인용과 함께 답변

그 말씀이 맞는것 같습니다 ^^

근데 제가 Code태그를 어떻게 쓰는건지 모르는 ( -ㅅ-);;
위로
사용자 정보 보기 비밀 메시지 보내기 이메일 보내기
장민석



가입: 2006년 9월 5일
올린 글: 165

올리기올려짐: 2007년4월3일 11:36    주제: 인용과 함께 답변

글 쓰실 때 alt+c [코드내용] alt+c 이렇게 치셔도 되고요,

아님 글을 다 쓰신 다음에 [코드내용]을 드래그하셔서 블록설정하신 다음 편집기 상단의 Code 버튼을 누르시면 됩니다.
위로
사용자 정보 보기 비밀 메시지 보내기
이우석
손님





올리기올려짐: 2007년4월4일 11:54    주제: 감사합니다~ 인용과 함께 답변

덕분에 예기치못한 문제점도 발견할 수 있었고 디버깅하기 수월했습니다 Very Happy 진심으로 감사드립니다~!
위로
이전 글 표시:   
이 게시판은 잠겼으므로 글을 올리거나, 답변을 하거나 수정을 할 수 없습니다   이 주제는 잠겼으므로 답변을 하거나 수정을 할 수 없습니다     게시판 인덱스 -> 4190.210 Principles of Programming (Spring 2007) 시간대: GMT + 9 시간(한국)
페이지 11

 
건너뛰기:  
새로운 주제를 올릴 수 있습니다
답글을 올릴 수 있습니다
주제를 수정할 수 없습니다
올린 글을 삭제할 수 없습니다
투표를 할 수 없습니다


Powered by phpBB 2.0.21-7 (Debian) © 2001, 2005 phpBB Group
Translated by kss & drssay