結果
問題 |
No.339 何人が回答したのか
|
ユーザー |
|
提出日時 | 2017-07-06 17:47:39 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 339 bytes |
コンパイル時間 | 686 ms |
コンパイル使用メモリ | 105,504 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 20:43:29 |
合計ジャッジ時間 | 2,428 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(2999): Warning: cannot inline function `std.numeric.gcdImpl!uint.gcdImpl`
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.numeric; // gcd, fft void main() { auto n = readln.chomp.to!size_t; auto a = n.iota.map!(_ => readln.chomp.to!int).array; auto g = a.fold!((a, b) => gcd(a, b)); foreach (r; 1..101) if (g * r % 100 == 0) { writeln(r); return; } }