結果

問題 No.312 置換処理
ユーザー kiridaruma
提出日時 2015-12-07 16:14:29
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 948 ms
コンパイル使用メモリ 96,756 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-12 02:49:23
合計ジャッジ時間 2,459 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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;

      for(ulong cnt = 3; cnt <= max; cnt++){
            if(n % cnt == 0){
                  cnt.writeln;
                  return;
            }
      }
      n.writeln;
}
0