結果

問題 No.88 次はどっちだ
ユーザー ldsybldsyb
提出日時 2016-05-20 15:46:15
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-04-16 01:50:02
合計ジャッジ時間 961 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
16,000 KB
testcase_01 AC 26 ms
16,000 KB
testcase_02 AC 25 ms
15,872 KB
testcase_03 AC 24 ms
16,000 KB
testcase_04 AC 26 ms
16,128 KB
testcase_05 AC 25 ms
15,872 KB
testcase_06 AC 25 ms
16,000 KB
testcase_07 AC 25 ms
15,872 KB
testcase_08 AC 25 ms
16,000 KB
testcase_09 AC 24 ms
16,000 KB
testcase_10 AC 26 ms
15,872 KB
権限があれば一括ダウンロードができます

ソースコード

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