글쓴이 메시지
김동욱

가입: 2013년 9월 14일
올린 글: 23

올려짐: 2013년12월2일 10:52    주제: 7-3 테스트케이스들

지난게시판들에 수강생들이 올린 racket버전 테스트케이스 코드를 모아 변경했습니다. 총 94개입니다.

모듈 타입 및 스트럭쳐에 Zero | One | Two 외에 Three ~ Nine 을 추가하셔야 돌아갑니다. 제출 하실땐 원래 스펙대로 복구하는것 잊지마시구욤~

 코드: open CommonGrade open Hw7_3 open Smatch let _ = print_string "#default\n" let _ = output (fun () -> true = (smatch "11" (Mult (Mult (One, Star Zero), Opt One)))) let _ = output (fun () -> false = (smatch "11" (Mult (Star (Mult (One, Zero)), One)))) let _ = print_string "#1 " let _ = output (fun () -> true = (smatch "123" (Mult (Mult (One, Two), Three)))) let _ = print_string "#2 " let _ = output (fun () -> true = (smatch "123" (Mult (One, Mult (Two, Three))))) let _ = print_string "#3 " let _ = output (fun () -> true = (smatch "1111111111111111" (Star (Star (Opt (One)))))) let _ = print_string "#4 " let _ = output (fun () -> true = (smatch "1234567890" (Mult (Mult (Mult (One, Two), Mult (Three, Mult (Four, Five))), Mult (Mult (Six, Seven), Mult (Eight, Mult (Nine, Zero))))))) let _ = print_string "#5 " let _ = output (fun () -> true = (smatch "1" (Opt (Opt (Opt (One)))))) let _ = print_string "#6 " let _ = output (fun () -> true = (smatch "" (Opt (Opt (Opt (One)))))) let _ = print_string "#7 " let _ = output (fun () -> true = (smatch "9999999999999999999999999998899" (Mult (Mult (Star (Nine), Star (Eight)), Sum (Opt (Nine), Star (Nine)))))) let _ = print_string "#8 " let _ = output (fun () -> true = (smatch "1001122220101220011111120001010012222" (Mult (Mult (One, Star (Sum (Sum (Star (Zero), Star (One)), Star (Two)))), Two)))) let _ = print_string "#9 " let _ = output (fun () -> true = (smatch "0" (Mult (Mult (Mult (Zero, Opt (One)), Opt (Mult (One, Zero))), Mult (Opt (Sum (Mult (Three, Seven), Mult (One, Zero))), Star (Mult (Star (Nine), Opt (Zero)))))))) let _ = print_string "#10 " let _ = output (fun () -> true = (smatch "01" (Mult (Mult (Mult (Zero, Opt (One)), Opt (Mult (One, Zero))), Mult (Opt (Sum (Mult (Three, Seven), Mult (One, Zero))), Star (Mult (Star (Nine), Opt (Zero)))))))) let _ = print_string "#11 " let _ = output (fun () -> true = (smatch "037" (Mult (Mult (Mult (Zero, Opt (One)), Opt (Mult (One, Zero))), Mult (Opt (Sum (Mult (Three, Seven), Mult (One, Zero))), Star (Mult (Star (Nine), Opt (Zero)))))))) let _ = print_string "#12 " let _ = output (fun () -> true = (smatch "0110370000009090990" (Mult (Mult (Mult (Zero, Opt (One)), Opt (Mult (One, Zero))), Mult (Opt (Sum (Mult (Three, Seven), Mult (One, Zero))), Star (Mult (Star (Nine), Opt (Zero)))))))) let _ = print_string "#13 " let _ = output (fun () -> false = (smatch "01103710000000" (Mult (Mult (Mult (Zero, Opt (One)), Opt (Mult (One, Zero))), Mult (Opt (Sum (Mult (Three, Seven), Mult (One, Zero))), Star (Mult (Star (Nine), Opt (Zero)))))))) let _ = print_string "#14 " let _ = output (fun () -> true = (smatch "01111113113313133" (Mult (Zero, Star (Sum (One, Mult (Opt (Two), Three))))))) let _ = print_string "#15 " let _ = output (fun () -> false = (smatch "012312312312" (Mult (Zero, Star (Sum (One, Mult (Opt (Two), Three))))))) let _ = print_string "#16 " let _ = output (fun () -> false = (smatch "011111112" (Mult (Zero, Star (Sum (One, Mult (Opt (Two), Three))))))) let _ = print_string "#17 " let _ = output (fun () -> false = (smatch "1001122220101220011111120001010012221" (Mult (Mult (One, Star (Sum (Sum (Star (Zero), Star (One)), Star (Two)))), Two)))) let _ = print_string "#18 " let _ = output (fun () -> false = (smatch "34" (Four))) let _ = print_string "#19 " let _ = output (fun () -> true = (smatch "01" (Mult (Zero, One)))) let _ = print_string "#20 " let _ = output (fun () -> true = (smatch "0" (Sum (Zero, One)))) let _ = print_string "#21 " let _ = output (fun () -> true = (smatch "2" (Opt (Two)))) let _ = print_string "#22 " let _ = output (fun () -> false = (smatch "3332" (Star (Three)))) let _ = print_string "#23 " let _ = output (fun () -> true = (smatch "3332" (Mult (Star (Three), Opt (Two))))) let _ = print_string "#24 " let _ = output (fun () -> true = (smatch "2332" (Mult (Opt (Two), Mult (Star (Three), Two))))) let _ = print_string "#25 " let _ = output (fun () -> true = (smatch "1010010110" (Star (Sum (Mult (One, Zero), Mult (Zero, One)))))) let _ = print_string "#26 " let _ = output (fun () -> false = (smatch "10100" (Star (Mult (One, Zero))))) let _ = print_string "#27 " let _ = output (fun () -> false = (smatch "0123" (Sum (Mult (Opt (Zero), Opt (One)), Mult (Two, Three))))) let _ = print_string "#28 " let _ = output (fun () -> true = (smatch "101" (Mult (Opt (One), Sum (Mult (Opt (Zero), Opt (One)), Mult (Two, Three)))))) let _ = print_string "#29 " let _ = output (fun () -> true = (smatch "9999" (Mult (Opt (Nine), Mult (Mult (Opt (Nine), Opt (Nine)), Opt (Nine)))))) let _ = print_string "#30 " let _ = output (fun () -> true = (smatch "999" (Mult (Opt (Nine), Mult (Mult (Opt (Nine), Opt (Nine)), Opt (Nine)))))) let _ = print_string "#31 " let _ = output (fun () -> true = (smatch "010" (Mult (Mult (Opt (Zero), Opt (One)), Mult (Opt (One), Opt (Zero)))))) let _ = print_string "#32 " let _ = output (fun () -> true = (smatch "010" (Mult (Zero, Sum (Mult (Opt (Zero), Opt (One)), Mult (Opt (One), Opt (Zero))))))) let _ = print_string "#33 " let _ = output (fun () -> false = (smatch "00009" (Star (Opt (Zero))))) let _ = print_string "#34 " let _ = output (fun () -> true = (smatch "232104" (Star (Mult (Mult (Mult (Mult (Opt (Zero), Opt (One)), Opt (Two)), Opt (Three)), Opt (Four)))))) let _ = print_string "#35 " let _ = output (fun () -> true = (smatch "111111111111111112" (Mult (Star (Sum (Mult (One, One), One)), Two)))) let _ = print_string "#36 " let _ = output (fun () -> true = (smatch "1111111111112" (Mult (Star (Sum (Mult (Mult (One, One), One), Sum (Mult (One, One), One))), Two)))) let _ = print_string "#37 " let _ = output (fun () -> true = (smatch "0010010101000100001000100001000010010010012" (Mult (Star (Sum (Sum (Mult (Zero, One), Zero), Mult (One, Zero))), Two)))) let _ = print_string "#38 " let _ = output (fun () -> true = (smatch "0" (Zero))) let _ = print_string "#39 " let _ = output (fun () -> true = (smatch "84" (Mult (Eight, Four)))) let _ = print_string "#40 " let _ = output (fun () -> true = (smatch "96" (Mult (Mult (Opt (Nine), Opt (Three)), Mult (Opt (Six), Opt (Seven)))))) let _ = print_string "#41 " let _ = output (fun () -> true = (smatch "17" (Mult (Opt (Mult (One, Zero)), Mult (One, Seven))))) let _ = print_string "#42 " let _ = output (fun () -> true = (smatch "111111111" (Star (One)))) let _ = print_string "#43 " let _ = output (fun () -> false = (smatch "11" (Mult (Star (Mult (One, Zero)), One)))) let _ = print_string "#44 " let _ = output (fun () -> true = (smatch "101" (Mult (Star (Mult (One, Zero)), One)))) let _ = print_string "#45 " let _ = output (fun () -> true = (smatch "10101" (Mult (Star (Mult (One, Zero)), One)))) let _ = print_string "#46 " let _ = output (fun () -> false = (smatch "10102" (Mult (Star (Mult (One, Zero)), One)))) let _ = print_string "#47 " let _ = output (fun () -> true = (smatch "12" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#48 " let _ = output (fun () -> false = (smatch "10" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#49 " let _ = output (fun () -> false = (smatch "13" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#50 " let _ = output (fun () -> false = (smatch "15" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#51 " let _ = output (fun () -> false = (smatch "24" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#52 " let _ = output (fun () -> false = (smatch "25" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#53 " let _ = output (fun () -> false = (smatch "34" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#54 " let _ = output (fun () -> true = (smatch "35" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#55 " let _ = output (fun () -> true = (smatch "45" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#56 " let _ = output (fun () -> false = (smatch "689" (Sum (Mult (One, Two), Mult (Sum (Three, Four), Five))))) let _ = print_string "#57 " let _ = output (fun () -> true = (smatch "754" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#58 " let _ = output (fun () -> true = (smatch "7757555544" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#59 " let _ = output (fun () -> false = (smatch "7454" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#60 " let _ = output (fun () -> true = (smatch "5754" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#61 " let _ = output (fun () -> true = (smatch "574" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#62 " let _ = output (fun () -> true = (smatch "444" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#63 " let _ = output (fun () -> false = (smatch "3192" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#64 " let _ = output (fun () -> true = (smatch "774" (Mult (Star (Mult (Opt (Seven), Opt (Five))), Star (Four))))) let _ = print_string "#65 " let _ = output (fun () -> true = (smatch "754" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#66 " let _ = output (fun () -> false = (smatch "7757555544" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#67 " let _ = output (fun () -> false = (smatch "7454" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#68 " let _ = output (fun () -> false = (smatch "5754" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#69 " let _ = output (fun () -> false = (smatch "574" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#70 " let _ = output (fun () -> true = (smatch "444" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#71 " let _ = output (fun () -> false = (smatch "3192" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#72 " let _ = output (fun () -> true = (smatch "774" (Mult (Star (Mult (Seven, Opt (Five))), Star (Four))))) let _ = print_string "#73 " let _ = output (fun () -> false = (smatch "1234" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#74 " let _ = output (fun () -> false = (smatch "1324" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#75 " let _ = output (fun () -> true = (smatch "1526" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#76 " let _ = output (fun () -> true = (smatch "3546" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#77 " let _ = output (fun () -> false = (smatch "3764" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#78 " let _ = output (fun () -> true = (smatch "1728" (Mult (Mult (Sum (One, Opt (Three)), Sum (Five, Seven)), Mult (Sum (Two, Four), Sum (Six, Eight)))))) let _ = print_string "#79 " let _ = output (fun () -> false = (smatch "12" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#80 " let _ = output (fun () -> false = (smatch "1212" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#81 " let _ = output (fun () -> false = (smatch "121212" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#82 " let _ = output (fun () -> true = (smatch "12121212" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#83 " let _ = output (fun () -> false = (smatch "1212121212" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#84 " let _ = output (fun () -> false = (smatch "11112222" (Mult (Mult (Mult (One, Two), Mult (One, Two)), Mult (Mult (One, Two), Mult (One, Two)))))) let _ = print_string "#85 " let _ = output (fun () -> false = (smatch "19" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#86 " let _ = output (fun () -> false = (smatch "1" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#87 " let _ = output (fun () -> false = (smatch "0" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#88 " let _ = output (fun () -> true = (smatch "10" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#89 " let _ = output (fun () -> true = (smatch "1999999999999999999999999999999999990" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#90 " let _ = output (fun () -> false = (smatch "129013499015679990189239999014567899999010" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#91 " let _ = output (fun () -> false = (smatch "14940" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#92 " let _ = output (fun () -> false = (smatch "1501990" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#93 " let _ = output (fun () -> false = (smatch "1220" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero))))) let _ = print_string "#94 " let _ = output (fun () -> false = (smatch "141400" (Mult (Mult (Mult (Mult (One, Opt (Two)), Mult (Opt (Three), Opt (Four))), Mult (Mult (Opt (Five), Opt (Six)), Mult (Opt (Seven), Opt (Eight)))), Mult (Star (Nine), Zero)))))
방인혁

가입: 2012년 9월 13일
올린 글: 18

 올려짐: 2013년12월2일 13:21    주제: 다 잘 작동하네요. 많은 도움이 됐습니다. 감사합니다.
복진욱

가입: 2013년 9월 21일
올린 글: 28

 올려짐: 2013년12월2일 14:22    주제: 잘 돌아가네요 감사합니다 ㅎㅎ
이동준

가입: 2013년 9월 4일
올린 글: 8

 올려짐: 2013년12월2일 17:08    주제: 우와 감사합니당
김동욱

가입: 2013년 9월 14일
올린 글: 23

 올려짐: 2013년12월2일 22:23    주제: 하하하
 이전 글 표시: 모든 글1일7일2주1달3달6달1년 오래된 글 먼저새로운 글 먼저
 시간대: GMT + 9 시간(한국) 페이지 1 중 1

 건너뛰기: 게시판 선택 010.142 Basics in Computing----------------010.142 Basics in Computing (Spring 2006) 400.002 Engineering Mathematics II----------------400.002 Engineering Mathematics II (Fall 2005) 4190.210 Principles of Programming----------------4190.210 Principles of Programming (Fall 2014)4190.210 Principles of Programming (Fall 2013)4190.210 Principles of Programming (Fall 2012)4190.210 Principles of Programming (Fall 2011)4190.210 Principles of Programming (Fall 2010)4190.210 Principles of Programming (Fall 2009)4190.210 Principles of Programming (Fall 2008)4190.210 Principles of Programming (Spring 2007)4190.210 Principles of Programming (Spring 2006) 4190.310 Programming Languages----------------4190.310 Programming Languages (Fall 2019)4190.310 Programming Languages (Fall 2018)4190.310 Programming Languages (Fall 2017)4190.310 Programming Languages (Fall 2015)4190.310 Programming Languages (Fall 2014)4190.310 Programming Languages (Fall 2013)4190.310 Programming Languages (Fall 2012)4190.310 Programming Languages (Fall 2011)4190.310 Programming Languages (Spring 2011)4190.310 Programming Languages (Fall 2010)4190.310 Programming Languages (Fall 2009)4190.310 Programming Languages (Fall 2008)4190.310 Programming Languages (Fall 2007)4190.310 Programming Languages (Fall 2006)4190.310 Programming Languages (Fall 2005) 4541.664A Program Analysis----------------4541.664A Program Analysis (Fall 2019)4541.664A Program Analysis (Spring 2017)4541.664A Program Analysis (Spring 2014)4541.664A Program Analysis (Spring 2013)4541.664A Program Analysis (Spring 2011)4541.664A Program Analysis (Spring 2010)4541.664A Program Analysis (Spring 2009)4541.664A Program Analysis (Fall 2008)4541.664A Program Analysis (Spring 2007)4541.664A Program Analysis (Spring 2006) 027.013 Computational Civilization----------------046.016 Computational Civilization (Spring 2019)046.016 Computational Civilization (Spring 2018)046.016 Computational Civilization (Spring 2015)046.016 Computational Civilization (Spring 2014)027.013 Computational Civilization (Fall 2012) SNU CSE Faculty Forum----------------SNU CSE Faculty Forum
새로운 주제를 올릴 수 없습니다
답글을 올릴 수 없습니다
주제를 수정할 수 없습니다
올린 글을 삭제할 수 없습니다
투표를 할 수 없습니다