結果
問題 | No.736 約比 |
ユーザー |
|
提出日時 | 2018-10-09 15:42:35 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 544 bytes |
コンパイル時間 | 860 ms |
コンパイル使用メモリ | 107,520 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-06-13 01:50:58 |
合計ジャッジ時間 | 2,464 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(2999): Warning: cannot inline function `std.numeric.gcdImpl!ulong.gcdImpl`
ソースコード
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string;import std.numeric;auto rdsp(){return readln.splitter;}void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;}void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);}void readA(T)(size_t n,ref T[]t){t=new T[](n);auto r=rdsp;foreach(ref v;t)pick(r,v);}void main(){int n; readV(n);long[] a; readA(n, a);auto g = a.fold!gcd;foreach (i, ai; a) {write(ai/g);if (i < n-1) write(":");}writeln;}