結果

問題 No.143 豆
コンテスト
ユーザー バカらっく
提出日時 2018-03-02 09:41:12
言語 Swift
(6.3.3)
コンパイル:
swiftc _filename_ -Ounchecked -o a.out
実行:
./a.out
結果
AC  
実行時間 4 ms / 1,000 ms
+ 457µs
コード長 246 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 15,863 ms
コンパイル使用メモリ 143,940 KB
実行使用メモリ 10,240 KB
最終ジャッジ日時 2026-08-24 00:08:13
合計ジャッジ時間 13,933 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

let inpt = readLine()!.split(separator: " ").map{Int($0)!}

let mameCount = inpt[0]*inpt[1]
let kazokuCount = inpt[2]

let kazoku = readLine()!.split(separator: " ").map{Int($0)!}.reduce(0){$0+$1}

let ans = max(-1, mameCount-kazoku)
print(ans)

0