結果

問題 No.851 テストケース
ユーザー Maboy
提出日時 2021-06-27 11:57:22
言語 Swift
(6.0.3)
結果
AC  
実行時間 9 ms / 3,153 ms
コード長 300 bytes
コンパイル時間 2,463 ms
コンパイル使用メモリ 135,704 KB
実行使用メモリ 9,600 KB
最終ジャッジ日時 2024-06-25 09:42:18
合計ジャッジ時間 4,183 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

let n = Int(readLine()!)!
var m = [Int]()
for _ in 1...n{
    let s = String(readLine()!)
    if s.contains(" "){
        break
    }else{
        m += [Int(s)!]
    }
}
if m == []{
    print("\"assert\"")
}else{
    let l = Array(Set([m[0]+m[1],m[0]+m[2],m[1]+m[2]])).sorted(by:>)
    print(l[1])
}
0