結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー nanae
提出日時 2017-06-15 19:32:51
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 429 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 101,456 KB
実行使用メモリ 25,116 KB
最終ジャッジ日時 2024-06-12 20:10:04
合計ジャッジ時間 2,119 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.string, std.conv, std.algorithm;
import std.range, std.array, std.container;

void main() {
    readln;
    readln.split.map!(to!long).sum.writeln;
}


void readInput(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg ; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront;
    }
    if (!line.empty) {
        throw new Exception("args num < input num");
    }
}
0