結果
| 問題 | No.3020 ユークリッドの互除法・改 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-14 23:24:38 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 3,324 ms |
| コンパイル使用メモリ | 171,536 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-07-01 10:21:17 |
| 合計ジャッジ時間 | 4,062 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 RE * 1 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(3011): Warning: cannot inline function `std.numeric.gcdImpl!ulong.gcdImpl`
private typeof(T.init % T.init) gcdImpl(T)(T a, T b)
^
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/numeric.d(3011): Warning: cannot inline function `std.numeric.gcdImpl!ulong.gcdImpl`
private typeof(T.init % T.init) gcdImpl(T)(T a, T b)
^
ソースコード
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);
}