結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー | バカらっく |
提出日時 | 2018-03-02 15:49:43 |
言語 | Swift (5.10.0) |
結果 |
AC
|
実行時間 | 7 ms / 1,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 129,132 KB |
実行使用メモリ | 8,260 KB |
最終ジャッジ日時 | 2023-08-20 10:26:37 |
合計ジャッジ時間 | 2,437 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 7 ms
8,260 KB |
testcase_01 | AC | 4 ms
8,168 KB |
testcase_02 | AC | 3 ms
8,212 KB |
testcase_03 | AC | 5 ms
8,212 KB |
testcase_04 | AC | 6 ms
8,180 KB |
testcase_05 | AC | 5 ms
8,136 KB |
testcase_06 | AC | 5 ms
8,164 KB |
testcase_07 | AC | 4 ms
8,140 KB |
testcase_08 | AC | 5 ms
8,160 KB |
testcase_09 | AC | 3 ms
8,204 KB |
testcase_10 | AC | 3 ms
8,176 KB |
testcase_11 | AC | 4 ms
8,132 KB |
testcase_12 | AC | 5 ms
8,136 KB |
コンパイルメッセージ
Main.swift:18:9: warning: immutable value 'i' was never used; consider replacing with '_' or removing it for i in 0..<6 { ^ _
ソースコード
let dungeonCount = Int(readLine()!)! let dethpena = 30000 var maxKouritu = 0 var maxKourituIdx = -1 for i in 1...dungeonCount { let inpt = readLine()!.split(separator: " ").map{Int($0)!} let kouritu = inpt[0] - (dethpena * inpt[1]) if(kouritu > maxKouritu) { maxKouritu = kouritu maxKourituIdx = i } } if(maxKouritu*6>=dethpena*100) { print("YES") for i in 0..<6 { print(maxKourituIdx) } } else { print("NO") }