結果

問題 No.88 次はどっちだ
ユーザー バカらっくバカらっく
提出日時 2018-03-03 22:07:04
言語 Swift
(5.10.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 750 ms
コンパイル使用メモリ 106,532 KB
実行使用メモリ 7,372 KB
最終ジャッジ日時 2023-08-20 10:28:38
合計ジャッジ時間 1,435 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,304 KB
testcase_01 AC 3 ms
7,212 KB
testcase_02 AC 3 ms
7,368 KB
testcase_03 AC 3 ms
7,032 KB
testcase_04 AC 3 ms
7,084 KB
testcase_05 AC 3 ms
7,212 KB
testcase_06 AC 3 ms
7,216 KB
testcase_07 AC 4 ms
7,228 KB
testcase_08 AC 3 ms
7,164 KB
testcase_09 AC 3 ms
7,372 KB
testcase_10 AC 3 ms
7,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.swift:6:5: warning: immutable value 'i' was never used; consider replacing with '_' or removing it
for i in 1...8 {
    ^
    _

ソースコード

diff #

let black = readLine()!
let white = black.prefix(1) == "o" ? "yukiko" : "oda"

var count = 0
for i in 1...8 {
    let line = readLine()!
    count += line.reduce(0, {$0 + ($1 != "." ? 1 : 0)})
}

if(count % 2  == 0) {
    print(black)
} else {
    print(white)
}
0