結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー ldsyb
提出日時 2016-05-24 18:03:53
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 79 ms / 5,000 ms
+ 675µs
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 21 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 21,248 KB
最終ジャッジ日時 2026-07-30 09:58:47
合計ジャッジ時間 2,601 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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