結果

問題 No.146 試験監督(1)
ユーザー nak2yoshinak2yoshi
提出日時 2016-02-22 00:22:41
言語 D
(dmd 2.106.1)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 620 ms
コンパイル使用メモリ 93,648 KB
実行使用メモリ 7,552 KB
最終ジャッジ日時 2023-09-02 20:38:01
合計ジャッジ時間 1,832 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;

void main()
{
    auto N = readln.strip.to!int;
    long[] C, D;
    foreach (_; 0 .. N)
    {
        auto input = readln.split.to!(long[]);
        C ~= input[0];
        D ~= input[1];
    }

    0UL.reduce!((a,b) => a+(C[b]+1)/2*D[b])(0.iota(N)).writeln;
}
0