結果

問題 No.36 素数が嫌い!
ユーザー AreTrashAreTrash
提出日時 2016-04-13 09:25:45
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 586 bytes
コンパイル時間 780 ms
コンパイル使用メモリ 110,052 KB
実行使用メモリ 25,920 KB
最終ジャッジ日時 2024-04-15 00:39:16
合計ジャッジ時間 3,556 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 81 ms
25,920 KB
testcase_02 AC 23 ms
23,516 KB
testcase_03 AC 24 ms
23,904 KB
testcase_04 AC 23 ms
23,488 KB
testcase_05 AC 24 ms
23,620 KB
testcase_06 AC 25 ms
23,648 KB
testcase_07 AC 24 ms
23,520 KB
testcase_08 AC 24 ms
25,816 KB
testcase_09 AC 23 ms
23,524 KB
testcase_10 WA -
testcase_11 AC 56 ms
23,520 KB
testcase_12 AC 125 ms
25,792 KB
testcase_13 AC 124 ms
23,776 KB
testcase_14 AC 25 ms
23,648 KB
testcase_15 AC 23 ms
23,772 KB
testcase_16 AC 24 ms
25,796 KB
testcase_17 AC 24 ms
23,728 KB
testcase_18 AC 25 ms
25,792 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 41 ms
23,516 KB
testcase_25 WA -
testcase_26 AC 85 ms
23,648 KB
testcase_27 AC 110 ms
23,516 KB
testcase_28 AC 85 ms
23,652 KB
testcase_29 AC 121 ms
25,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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