結果

問題 No.312 置換処理
ユーザー kiridaruma
提出日時 2015-12-07 15:53:44
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 758 ms
コンパイル使用メモリ 96,640 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 02:49:07
合計ジャッジ時間 2,152 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 39 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.conv, std.string, std.math;

void main() {
      ulong n = readln.chomp.to!ulong;
      ulong max = n.to!real.sqrt.to!ulong;
      ulong res = n;
      for(ulong cnt = max; cnt > 2; cnt--){
            if(n % cnt == 0){
                  res = cnt;
            }
      }
      res.writeln;
}
0