結果
問題 |
No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2017-06-15 19:30:22 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 74 ms / 3,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 692 ms |
コンパイル使用メモリ | 101,324 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 20:10:02 |
合計ジャッジ時間 | 2,567 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 15 |
ソースコード
import std.stdio, std.string, std.conv, std.algorithm; import std.range, std.array, std.container; void main() { int n = readln.chomp.to!int; iota(n).map!(i => readln.chomp.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"); } }