結果
問題 | No.36 素数が嫌い! |
ユーザー | tonnnura172 |
提出日時 | 2020-05-12 13:27:47 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,047 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 11,004 KB |
実行使用メモリ | 85,216 KB |
最終ジャッジ日時 | 2023-10-11 12:18:55 |
合計ジャッジ時間 | 30,163 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 664 ms
44,564 KB |
testcase_01 | WA | - |
testcase_02 | AC | 29 ms
9,724 KB |
testcase_03 | AC | 29 ms
9,760 KB |
testcase_04 | AC | 29 ms
9,784 KB |
testcase_05 | AC | 34 ms
9,944 KB |
testcase_06 | AC | 35 ms
10,096 KB |
testcase_07 | AC | 35 ms
10,100 KB |
testcase_08 | AC | 29 ms
9,792 KB |
testcase_09 | AC | 31 ms
9,736 KB |
testcase_10 | AC | 31 ms
9,784 KB |
testcase_11 | AC | 883 ms
34,308 KB |
testcase_12 | AC | 2,885 ms
85,216 KB |
testcase_13 | AC | 2,854 ms
85,008 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 29 ms
9,884 KB |
testcase_17 | AC | 28 ms
9,820 KB |
testcase_18 | AC | 29 ms
9,756 KB |
testcase_19 | AC | 551 ms
38,960 KB |
testcase_20 | AC | 1,646 ms
84,884 KB |
testcase_21 | AC | 1,147 ms
67,336 KB |
testcase_22 | AC | 1,184 ms
68,772 KB |
testcase_23 | AC | 702 ms
45,288 KB |
testcase_24 | WA | - |
testcase_25 | AC | 776 ms
48,620 KB |
testcase_26 | AC | 1,694 ms
55,376 KB |
testcase_27 | AC | 2,487 ms
74,296 KB |
testcase_28 | AC | 1,682 ms
54,572 KB |
testcase_29 | AC | 2,768 ms
82,536 KB |
ソースコード
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(int(N**0.5)+1) for i in range(2, int(N**0.5)+1): if N%i == 0 and not is_prime[i]: print("YES") break else: print("NO")