結果

問題 No.36 素数が嫌い!
ユーザー しらゆき
提出日時 2015-11-23 14:06:03
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 535 bytes
コンパイル時間 3,164 ms
コンパイル使用メモリ 111,748 KB
実行使用メモリ 17,664 KB
最終ジャッジ日時 2024-09-13 17:15:55
合計ジャッジ時間 7,687 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other AC * 5 TLE * 1 -- * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 <= n / 2; i++)
        {
            if (n % i == 0)
            {
                for (int j = 2; j <= i / 2; j++)
                {
                    if (i % j == 0)
                    {
                        Console.WriteLine("YES");
                        return;
                    }
                }
            }            
        }

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