結果

問題 No.143 豆
コンテスト
ユーザー バカらっく
提出日時 2018-03-02 09:41:12
言語 Swift
(6.2.4)
コンパイル:
swiftc _filename_ -Ounchecked -o a.out
実行:
./a.out
結果
AC  
実行時間 5 ms / 1,000 ms
コード長 246 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 13,187 ms
コンパイル使用メモリ 143,956 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2026-04-03 13:58:37
合計ジャッジ時間 12,457 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_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