結果

問題 No.146 試験監督(1)
ユーザー kiridarumakiridaruma
提出日時 2016-11-10 13:29:19
言語 D
(dmd 2.106.1)
結果
RE  
実行時間 -
コード長 301 bytes
コンパイル時間 646 ms
コンパイル使用メモリ 92,128 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-09-02 22:50:05
合計ジャッジ時間 1,373 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.d(9): Warning: `long += float` is performing truncating conversion

ソースコード

diff #

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

void main(){
    int n = readln.strip.to!int;
    long sum = 0;
    foreach(i;0..n){
        auto input = readln.strip.split.map!(to!int).array;
        sum += ceil(input[0] / 2f) * input[1];
    }
    writeln(sum);
}
0