結果

問題 No.1256 連続整数列
ユーザー tamatotamato
提出日時 2020-10-16 21:26:48
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 688 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 57,728 KB
最終ジャッジ日時 2024-07-21 01:15:08
合計ジャッジ時間 2,148 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    def PrimeDecomposition(N):
        ret = {}
        n = int(N ** 0.5)
        for d in range(2, n + 1):
            while N % d == 0:
                if d not in ret:
                    ret[d] = 1
                else:
                    ret[d] += 1
                N //= d
            if N == 1:
                break
        if N != 1:
            ret[N] = 1
        return ret

    a = int(input())
    P = PrimeDecomposition(a)
    if a == 1:
        print("NO")
    elif len(P) == 1 and 2 in P:
        print("NO")
    else:
        print("YES")


if __name__ == '__main__':
    main()
0