結果
問題 | No.36 素数が嫌い! |
ユーザー | vwxyz |
提出日時 | 2022-02-17 02:23:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 392 ms / 5,000 ms |
コード長 | 889 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 87,052 KB |
実行使用メモリ | 92,364 KB |
最終ジャッジ日時 | 2023-09-11 17:23:02 |
合計ジャッジ時間 | 10,066 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 283 ms
92,260 KB |
testcase_01 | AC | 249 ms
92,132 KB |
testcase_02 | AC | 246 ms
91,484 KB |
testcase_03 | AC | 247 ms
91,204 KB |
testcase_04 | AC | 246 ms
91,536 KB |
testcase_05 | AC | 244 ms
92,236 KB |
testcase_06 | AC | 244 ms
92,100 KB |
testcase_07 | AC | 248 ms
92,300 KB |
testcase_08 | AC | 255 ms
91,420 KB |
testcase_09 | AC | 246 ms
91,344 KB |
testcase_10 | AC | 245 ms
92,104 KB |
testcase_11 | AC | 294 ms
92,000 KB |
testcase_12 | AC | 392 ms
92,112 KB |
testcase_13 | AC | 391 ms
92,192 KB |
testcase_14 | AC | 248 ms
92,268 KB |
testcase_15 | AC | 251 ms
91,540 KB |
testcase_16 | AC | 254 ms
91,260 KB |
testcase_17 | AC | 244 ms
91,316 KB |
testcase_18 | AC | 243 ms
91,312 KB |
testcase_19 | AC | 253 ms
92,336 KB |
testcase_20 | AC | 251 ms
92,328 KB |
testcase_21 | AC | 269 ms
91,964 KB |
testcase_22 | AC | 259 ms
92,040 KB |
testcase_23 | AC | 255 ms
92,176 KB |
testcase_24 | AC | 273 ms
92,000 KB |
testcase_25 | AC | 278 ms
92,200 KB |
testcase_26 | AC | 315 ms
92,364 KB |
testcase_27 | AC | 253 ms
92,136 KB |
testcase_28 | AC | 307 ms
92,264 KB |
testcase_29 | AC | 259 ms
92,356 KB |
ソースコード
import bisect import copy import decimal import fractions import heapq import itertools import math import random import sys from collections import Counter, deque,defaultdict from functools import lru_cache,reduce from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max def _heappush_max(heap,item): heap.append(item) heapq._siftdown_max(heap, 0, len(heap)-1) def _heappushpop_max(heap, item): if heap and item < heap[0]: item, heap[0] = heap[0], item heapq._siftup_max(heap, 0) return item from math import gcd as GCD read=sys.stdin.read readline=sys.stdin.readline readlines=sys.stdin.readlines N=int(readline()) cnt=0 for p in range(2,int(N**.5)+1): while N%p==0: N//=p cnt+=1 if N==1: break if p**2>N: break if N!=1: cnt+=1 if cnt>=3: ans='YES' else: ans='NO' print(ans)