結果
| 問題 | No.312 置換処理 |
| コンテスト | |
| ユーザー |
kokatsu
|
| 提出日時 | 2021-12-21 20:52:14 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| + 848µs | |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 1,021 ms |
| コンパイル使用メモリ | 185,088 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-27 03:57:23 |
| 合計ジャッジ時間 | 3,092 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 45 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/core/checkedint.d(814): Warning: cannot inline function `core.checkedint.mulu!().mulu`
ulong mulu()(ulong x, uint y, ref bool overflow)
^
ソースコード
import std;
void main() {
long N;
readf("%d\n", N);
long S = N.to!real.sqrt.floor.to!long;
long res = N;
foreach (i; 2 .. S+1) {
if (N % i == 0) {
if (i > 2) {
res = min(res, i);
}
if (N / i > 2) {
res = min(res, N/i);
}
}
}
res.writeln;
}
kokatsu