結果

問題 No.36 素数が嫌い!
ユーザー tonnnura172tonnnura172
提出日時 2020-05-12 13:26:26
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
RE  
実行時間 -
コード長 1,023 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 595,060 KB
最終ジャッジ日時 2023-10-11 12:15:58
合計ジャッジ時間 7,177 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 34 ms
9,712 KB
testcase_03 AC 31 ms
9,768 KB
testcase_04 AC 31 ms
9,768 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 MLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def sieve(n):
	s = [True] * n
	for x in range(2, int(n ** 0.5) + 1):
		if s[x]:
			for i in range(x + x, n, x):
				s[i] = False
	return s

N = INT()
is_prime = sieve(N)

for i in range(2, N):
	if N%i == 0 and not is_prime[i]:
		print("YES")
		break
else:
	print("NO")
0