結果
問題 |
No.8044 April Sum of Odd
|
ユーザー |
![]() |
提出日時 | 2019-04-01 21:25:24 |
言語 | D (dmd 2.109.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 1,364 ms |
コンパイル使用メモリ | 104,804 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-13 04:41:48 |
合計ジャッジ時間 | 2,052 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 7 |
ソースコード
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { readln; auto AS = readln.split.to!(long[]); long s; foreach (a; AS) { if (a%2 == 1) { s += a; } else if (s) { writeln(s); s = 0; } } if (s) writeln(s); }