結果

問題 No.143 豆
コンテスト
ユーザー nanae
提出日時 2017-03-01 23:30:06
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 354 bytes
コンパイル時間 1,053 ms
コンパイル使用メモリ 99,840 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 07:08:36
合計ジャッジ時間 1,725 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio;
import std.string, std.conv, std.array, std.algorithm;
import std.uni;

void main(){
    // Input
    auto line = readln.split.map!(to!int).array;
    int K = line[0], N = line[1], F = line[2];
    auto A = readln.split.map!(to!int).array;

    // Process
    int ans = K * N - sum(A);

    // Output
    writeln(ans >= 0 ? ans : -1);
}
0