結果

問題 No.88 次はどっちだ
ユーザー ldsyb
提出日時 2016-05-20 15:46:15
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 24 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 327 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 15,872 KB
最終ジャッジ日時 2024-10-06 11:23:01
合計ジャッジ時間 851 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

(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