結果
問題 |
No.136 Yet Another GCD Problem
|
ユーザー |
|
提出日時 | 2017-01-31 17:03:41 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 916 ms |
コンパイル使用メモリ | 102,900 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 06:48:06 |
合計ジャッジ時間 | 2,229 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 39 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.math; // math functions void main() { auto rd = readln.split.to!(int[]), n = rd[0], k = rd[1]; auto calc() { foreach (i; 2..n.to!real.sqrt.to!int + 2) if (n % i == 0) return n / i; return 1; } writeln(calc); }