結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー ldsyb
提出日時 2016-05-24 18:03:53
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 444 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 202 ms
コンパイル使用メモリ 6,400 KB
実行使用メモリ 20,992 KB
最終ジャッジ日時 2026-03-12 23:51:27
合計ジャッジ時間 2,156 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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