結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
バカらっく
|
| 提出日時 | 2018-03-02 15:49:43 |
| 言語 | Swift (6.0.3) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 1,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 1,180 ms |
| コンパイル使用メモリ | 130,896 KB |
| 実行使用メモリ | 9,344 KB |
| 最終ジャッジ日時 | 2024-11-30 12:04:11 |
| 合計ジャッジ時間 | 2,043 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 |
コンパイルメッセージ
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")
}
バカらっく