結果

問題 No.851 テストケース
ユーザー MaboyMaboy
提出日時 2021-06-27 11:57:22
言語 Swift
(5.10.0)
結果
AC  
実行時間 4 ms / 3,153 ms
コード長 300 bytes
コンパイル時間 2,007 ms
コンパイル使用メモリ 136,872 KB
実行使用メモリ 8,128 KB
最終ジャッジ日時 2023-09-07 15:48:45
合計ジャッジ時間 3,193 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,992 KB
testcase_01 AC 3 ms
8,128 KB
testcase_02 AC 3 ms
7,524 KB
testcase_03 AC 3 ms
7,976 KB
testcase_04 AC 3 ms
7,936 KB
testcase_05 AC 3 ms
7,948 KB
testcase_06 AC 4 ms
8,124 KB
testcase_07 AC 4 ms
7,936 KB
testcase_08 AC 3 ms
8,120 KB
testcase_09 AC 3 ms
7,916 KB
testcase_10 AC 4 ms
8,040 KB
testcase_11 AC 3 ms
7,924 KB
testcase_12 AC 4 ms
7,976 KB
testcase_13 AC 4 ms
7,944 KB
testcase_14 AC 4 ms
7,996 KB
testcase_15 AC 4 ms
7,976 KB
testcase_16 AC 4 ms
7,976 KB
testcase_17 AC 4 ms
7,944 KB
testcase_18 AC 4 ms
8,020 KB
testcase_19 AC 3 ms
7,704 KB
testcase_20 AC 4 ms
7,432 KB
testcase_21 AC 3 ms
7,980 KB
testcase_22 AC 3 ms
8,048 KB
権限があれば一括ダウンロードができます

ソースコード

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