結果

問題 No.36 素数が嫌い!
ユーザー AreTrash
提出日時 2016-04-13 09:25:45
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 586 bytes
コンパイル時間 885 ms
コンパイル使用メモリ 109,636 KB
実行使用メモリ 27,840 KB
最終ジャッジ日時 2024-10-04 07:13:38
合計ジャッジ時間 3,460 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace No36_1{
    public class Program{
        public static void Main(string[] args){
            var input = long.Parse(Console.ReadLine());
            var tmp = input;
            var cnt = 0;

            for(long i = 2; i * i < input; i++){
                while(tmp % i == 0){
                    tmp /= i;
                    cnt++;
                    if(cnt == 3) {
                        Console.WriteLine("YES");
                        return;
                    }
                }
            }
            Console.WriteLine("NO");
        }
    }
}
0