結果

問題 No.239 にゃんぱすー
ユーザー バカらっくバカらっく
提出日時 2018-03-01 14:27:53
言語 Swift
(5.10.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 592 bytes
コンパイル時間 1,376 ms
コンパイル使用メモリ 129,752 KB
実行使用メモリ 8,336 KB
最終ジャッジ日時 2023-08-20 10:21:17
合計ジャッジ時間 3,077 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,756 KB
testcase_01 AC 3 ms
7,876 KB
testcase_02 AC 3 ms
7,752 KB
testcase_03 AC 3 ms
7,784 KB
testcase_04 AC 3 ms
7,776 KB
testcase_05 AC 4 ms
7,744 KB
testcase_06 AC 4 ms
7,776 KB
testcase_07 AC 4 ms
7,884 KB
testcase_08 AC 3 ms
7,848 KB
testcase_09 AC 3 ms
7,892 KB
testcase_10 AC 4 ms
7,776 KB
testcase_11 AC 4 ms
7,868 KB
testcase_12 AC 4 ms
7,804 KB
testcase_13 AC 5 ms
7,988 KB
testcase_14 AC 4 ms
7,872 KB
testcase_15 AC 6 ms
7,956 KB
testcase_16 AC 6 ms
8,068 KB
testcase_17 AC 6 ms
8,040 KB
testcase_18 AC 7 ms
7,988 KB
testcase_19 AC 7 ms
7,996 KB
testcase_20 AC 8 ms
8,032 KB
testcase_21 AC 9 ms
8,136 KB
testcase_22 AC 9 ms
8,104 KB
testcase_23 AC 10 ms
8,180 KB
testcase_24 AC 11 ms
8,328 KB
testcase_25 AC 12 ms
8,316 KB
testcase_26 AC 12 ms
8,336 KB
testcase_27 AC 4 ms
7,784 KB
testcase_28 AC 4 ms
7,836 KB
testcase_29 AC 4 ms
7,848 KB
testcase_30 AC 5 ms
8,016 KB
testcase_31 AC 5 ms
7,988 KB
testcase_32 AC 7 ms
8,120 KB
testcase_33 AC 8 ms
8,044 KB
testcase_34 AC 9 ms
8,132 KB
testcase_35 AC 11 ms
8,212 KB
testcase_36 AC 12 ms
8,336 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.swift:5:5: warning: immutable value 'i' was never used; consider replacing with '_' or removing it
for i in 0..<murabito {
    ^
    _

ソースコード

diff #

let murabito = Int(readLine()!)!

var map = [[String]]()

for i in 0..<murabito {
        map.append(readLine()!.split(separator:" ").map(String.init))
}

var ans:Int? = nil
for i in 0..<murabito {
    var isNyan = true
    for j in 0..<murabito {
        if(map[j][i]=="nyanpass" || map[j][i] == "-") {
            
        } else {
            isNyan = false
            break
        }
    }
    if(isNyan) {
        if(ans == nil) {
            ans = i+1
        } else {
            ans = nil
            break
        }
    }
}

if(ans == nil) {
    print(-1)
} else {
    print(ans!)
}
0