結果
問題 |
No.141 魔法少女コバ
|
ユーザー |
|
提出日時 | 2017-02-01 13:48:43 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1,432 ms / 5,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 875 ms |
コンパイル使用メモリ | 105,340 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 06:49:39 |
合計ジャッジ時間 | 10,238 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 93 |
コンパイルメッセージ
/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 void main() { auto rd = readln.split.to!(int[]), m = rd[0], n = rd[1]; auto g = gcd(m, n); m /= g; n /= g; auto r = 0; for (; m > 1 || n > 1; ++r) { if (m > n) m -= n; else swap(m, n); } writeln(r); }