結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2018-03-02 09:41:12 |
言語 | Swift (6.0.3) |
結果 |
AC
|
実行時間 | 9 ms / 1,000 ms |
コード長 | 246 bytes |
コンパイル時間 | 9,887 ms |
コンパイル使用メモリ | 129,408 KB |
実行使用メモリ | 9,472 KB |
最終ジャッジ日時 | 2024-07-23 10:55:28 |
合計ジャッジ時間 | 10,673 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
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)