結果
| 問題 |
No.2751 429-like Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-10 22:01:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 82,568 KB |
| 実行使用メモリ | 154,972 KB |
| 最終ジャッジ日時 | 2024-12-20 05:32:18 |
| 合計ジャッジ時間 | 79,679 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 8 TLE * 14 |
ソースコード
def f(n):
if n == 1:
return 0
init = n
i = 2
cnt = 0
while 1 < n and cnt < 4:
if init < i**2:
break
if n % i == 0:
while n % i == 0:
n //= i
cnt += 1
i += 1
if n != 1:
cnt += 1
return cnt == 3
Q = int(input())
for _ in range(Q):
a = int(input())
if f(a):
print('Yes')
else:
print('No')