結果

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

ソースコード

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