結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ldsybldsyb
提出日時 2016-05-24 18:03:53
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 104 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 17,612 KB
最終ジャッジ日時 2023-09-08 14:50:42
合計ジャッジ時間 2,672 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
12,172 KB
testcase_01 AC 103 ms
17,496 KB
testcase_02 AC 18 ms
11,668 KB
testcase_03 AC 19 ms
11,848 KB
testcase_04 AC 19 ms
11,952 KB
testcase_05 AC 97 ms
17,452 KB
testcase_06 AC 19 ms
11,760 KB
testcase_07 AC 18 ms
11,892 KB
testcase_08 AC 20 ms
11,860 KB
testcase_09 AC 18 ms
11,896 KB
testcase_10 AC 18 ms
11,656 KB
testcase_11 AC 18 ms
11,724 KB
testcase_12 AC 18 ms
11,896 KB
testcase_13 AC 18 ms
11,628 KB
testcase_14 AC 70 ms
15,312 KB
testcase_15 AC 41 ms
13,764 KB
testcase_16 AC 80 ms
16,740 KB
testcase_17 AC 39 ms
13,992 KB
testcase_18 AC 79 ms
16,140 KB
testcase_19 AC 67 ms
15,508 KB
testcase_20 AC 104 ms
17,420 KB
testcase_21 AC 19 ms
11,984 KB
testcase_22 AC 48 ms
14,324 KB
testcase_23 AC 101 ms
17,508 KB
testcase_24 AC 102 ms
17,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define ans 0)
(define max 0)
(define tmp 0)
(define n (read))
(define l (list))
(let loop((i n))
	(set! l (cons (read) l))
	(if (> i 1) (loop (- i 1))))
(define (countnum ls num retnum)
	(if (pair? ls)
		(countnum (cdr ls) num (if (= (car ls) num) (+ retnum 1) retnum))
		retnum))
(let loop((i 1))
	(set! tmp (countnum l i 0))
	(if (<= max tmp)
		(begin
			(set! ans i)
			(set! max tmp)))
	(if (< i 6) (loop (+ i 1))))
(display ans)
(newline)
0