結果

問題 No.36 素数が嫌い!
ユーザー しらゆきしらゆき
提出日時 2015-11-23 14:11:44
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 549 bytes
コンパイル時間 2,091 ms
コンパイル使用メモリ 101,772 KB
実行使用メモリ 22,752 KB
最終ジャッジ日時 2023-10-11 18:20:33
合計ジャッジ時間 6,124 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,640 KB
testcase_01 WA -
testcase_02 AC 53 ms
20,648 KB
testcase_03 AC 53 ms
20,704 KB
testcase_04 AC 55 ms
20,580 KB
testcase_05 AC 54 ms
20,676 KB
testcase_06 AC 54 ms
20,788 KB
testcase_07 AC 54 ms
20,656 KB
testcase_08 AC 54 ms
20,684 KB
testcase_09 AC 54 ms
20,640 KB
testcase_10 AC 53 ms
22,632 KB
testcase_11 AC 94 ms
20,560 KB
testcase_12 AC 178 ms
20,576 KB
testcase_13 AC 178 ms
20,780 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 54 ms
20,796 KB
testcase_17 AC 54 ms
18,616 KB
testcase_18 AC 54 ms
20,624 KB
testcase_19 AC 53 ms
20,508 KB
testcase_20 AC 67 ms
22,612 KB
testcase_21 AC 53 ms
18,656 KB
testcase_22 AC 54 ms
20,684 KB
testcase_23 AC 54 ms
20,676 KB
testcase_24 WA -
testcase_25 AC 55 ms
22,616 KB
testcase_26 AC 129 ms
20,676 KB
testcase_27 AC 160 ms
20,692 KB
testcase_28 AC 127 ms
20,796 KB
testcase_29 AC 174 ms
22,752 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        long n = long.Parse(Console.ReadLine());
        
        for (int i = 2; i <= Math.Sqrt(n); i++)
        {
            if (n % i == 0)
            {
                for (int j = 2; j <= Math.Sqrt(i); j++)
                {
                    if (i % j == 0)
                    {
                        Console.WriteLine("YES");
                        return;
                    }
                }
            }            
        }

        Console.WriteLine("NO");
    }
}
0