結果

問題 No.88 次はどっちだ
コンテスト
ユーザー ldsyb
提出日時 2016-05-20 15:46:15
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 454 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 166 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2026-04-22 12:55:24
合計ジャッジ時間 1,900 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(define s (read-line))
(define count 0)
(define b (list))
(define (countc ls c n)
	(if (pair? ls)
		(begin
			(if (char=? (car ls) c)
				(set! n (+ n 1)))
			(countc (cdr ls) c n))
		n))
(let loop((i 8))
	(set! b (string->list (read-line)))
	(set! count (+ count (countc b #\b 0)))
	(set! count (+ count (countc b #\w 0)))
	(if (> i 1) (loop (- i 1))))
(if (= (modulo count 2) 0)
	(display s)
	(display (if (string=? s "oda") "yukiko" "oda")))
(newline)
0