結果
| 問題 |
No.516 赤と青の風船
|
| コンテスト | |
| ユーザー |
バカらっく
|
| 提出日時 | 2018-03-01 13:52:08 |
| 言語 | Swift (6.0.3) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 5,510 ms |
| コンパイル使用メモリ | 116,696 KB |
| 実行使用メモリ | 9,344 KB |
| 最終ジャッジ日時 | 2024-11-30 11:59:24 |
| 合計ジャッジ時間 | 1,255 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 |
コンパイルメッセージ
Main.swift:5:5: warning: immutable value 'i' was never used; consider replacing with '_' or removing it
for i in 0...2 {
^
_
ソースコード
var dic = [String:Int]()
var mx = 0
var ans:String = ""
for i in 0...2 {
let num = readLine()!
if(dic[num] != nil) {
dic[num]!+=1
} else {
dic[num] = 0
}
if(mx<dic[num]!) {
mx = dic[num]!
ans = num
}
}
print(ans)
バカらっく