結果

問題 No.994 ばらばらコイン
ユーザー MaboyMaboy
提出日時 2021-06-28 12:28:30
言語 Swift
(5.10.0)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 127 bytes
コンパイル時間 1,026 ms
コンパイル使用メモリ 126,784 KB
実行使用メモリ 8,332 KB
最終ジャッジ日時 2023-09-07 18:22:28
合計ジャッジ時間 2,438 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
8,172 KB
testcase_01 AC 3 ms
8,124 KB
testcase_02 AC 41 ms
8,172 KB
testcase_03 AC 41 ms
8,180 KB
testcase_04 AC 41 ms
8,156 KB
testcase_05 AC 22 ms
8,212 KB
testcase_06 AC 41 ms
8,332 KB
testcase_07 AC 41 ms
8,216 KB
testcase_08 AC 29 ms
8,176 KB
testcase_09 AC 39 ms
8,112 KB
testcase_10 AC 30 ms
8,156 KB
testcase_11 AC 33 ms
8,208 KB
testcase_12 AC 36 ms
8,092 KB
testcase_13 AC 3 ms
8,288 KB
testcase_14 AC 3 ms
8,180 KB
testcase_15 AC 3 ms
8,152 KB
testcase_16 AC 3 ms
8,112 KB
testcase_17 AC 3 ms
8,172 KB
testcase_18 AC 3 ms
8,184 KB
testcase_19 AC 3 ms
8,160 KB
testcase_20 AC 3 ms
8,264 KB
testcase_21 AC 3 ms
8,176 KB
testcase_22 AC 3 ms
8,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.swift:3:5: warning: result of call to 'readLine(strippingNewline:)' is unused
    readLine()
    ^       ~~

ソースコード

diff #

let n = readLine()!.split(separator: " ").map{Int($0)!}
for _ in 1..<n[0]{
    readLine()
}
print(n[0] >= n[1] ? n[1] - 1 : -1)
0