結果
問題 | No.3020 ユークリッドの互除法・改 |
ユーザー |
|
提出日時 | 2025-02-14 23:24:38 |
言語 | D (dmd 2.109.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 281 bytes |
コンパイル時間 | 4,454 ms |
コンパイル使用メモリ | 165,424 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-14 23:29:21 |
合計ジャッジ時間 | 5,578 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 RE * 1 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(2999): Warning: cannot inline function `std.numeric.gcdImpl!ulong.gcdImpl` /home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(2999): Warning: cannot inline function `std.numeric.gcdImpl!ulong.gcdImpl`
ソースコード
import std;import core.bitop;import core.checkedint;import core.time;void main() {const a = readln.split.to!(int[]);const b = readln.split.to!(int[]);const c = (a ~ b).to!(long[]);const g = c.fold!(gcd);writeln(g, " ", abs(c[0] * c[3] - c[1] * c[2]) / g);}