結果
| 問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
| コンテスト | |
| ユーザー |
diginatu
|
| 提出日時 | 2014-11-28 18:13:11 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 557 bytes |
| コンパイル時間 | 1,424 ms |
| コンパイル使用メモリ | 160,120 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-12 01:42:10 |
| 合計ジャッジ時間 | 2,309 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 WA * 4 RE * 1 |
ソースコード
import std.stdio, std.conv, std.math, std.string, std.range, std.array,
std.algorithm, std.bigint;
void main(){
auto N = readln().strip().to!int();
BigInt ans = "0";
foreach(immutable int i; 0 .. N) {
auto t = readln().strip().split('.').map!(to!string)();
char[] tt = "0000000000".dup;
if(t.length == 2) {
foreach(ulong j; 0 .. t[1].length) {
tt[j] = t[1][j];
}
}
ans += BigInt(t[0] ~ tt);
}
auto anss = ans.to!(char[]);
writeln( anss[0 .. $-10] ~ "." ~ anss[$-10 .. $] );
}
diginatu