結果

問題 No.1256 連続整数列
ユーザー bluemeganebluemegane
提出日時 2020-10-16 22:46:47
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 350 bytes
コンパイル時間 2,454 ms
コンパイル使用メモリ 69,108 KB
実行使用メモリ 24,860 KB
最終ジャッジ日時 2023-09-28 07:00:59
合計ジャッジ時間 4,381 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,628 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 51 ms
20,696 KB
testcase_07 AC 51 ms
20,632 KB
testcase_08 AC 53 ms
22,620 KB
testcase_09 AC 53 ms
22,772 KB
testcase_10 AC 53 ms
20,872 KB
testcase_11 AC 52 ms
20,736 KB
testcase_12 AC 53 ms
20,756 KB
testcase_13 AC 52 ms
20,688 KB
testcase_14 AC 52 ms
20,732 KB
testcase_15 AC 53 ms
20,648 KB
testcase_16 AC 51 ms
20,884 KB
testcase_17 AC 51 ms
20,724 KB
testcase_18 AC 52 ms
22,700 KB
testcase_19 AC 52 ms
22,760 KB
testcase_20 AC 52 ms
20,824 KB
testcase_21 AC 52 ms
18,752 KB
testcase_22 AC 52 ms
20,692 KB
testcase_23 AC 52 ms
20,744 KB
testcase_24 AC 53 ms
20,688 KB
testcase_25 AC 52 ms
20,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns (int n)
    {
        for (int i = 3; i * i <= n; i+= 2)
        {
            if (n % i == 0) { Console.WriteLine("YES"); return; }
        }
        Console.WriteLine("NO");
    }
}
0