結果

問題 No.3093 Please GCD
ユーザー MasKoaTSMasKoaTS
提出日時 2022-04-01 22:04:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,068 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,324 KB
実行使用メモリ 100,852 KB
平均クエリ数 505.00
最終ジャッジ日時 2023-08-12 19:01:40
合計ジャッジ時間 12,416 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 225 ms
97,492 KB
testcase_01 AC 218 ms
97,208 KB
testcase_02 AC 228 ms
98,252 KB
testcase_03 AC 273 ms
100,024 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 300 ms
100,016 KB
testcase_07 AC 261 ms
100,320 KB
testcase_08 AC 264 ms
100,468 KB
testcase_09 AC 280 ms
100,852 KB
testcase_10 AC 216 ms
97,356 KB
testcase_11 AC 247 ms
99,912 KB
testcase_12 AC 277 ms
100,100 KB
testcase_13 WA -
testcase_14 AC 285 ms
99,988 KB
testcase_15 AC 227 ms
98,232 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 362 ms
100,080 KB
testcase_19 AC 270 ms
100,704 KB
testcase_20 AC 349 ms
100,120 KB
testcase_21 AC 277 ms
100,632 KB
testcase_22 AC 280 ms
100,016 KB
testcase_23 WA -
testcase_24 AC 284 ms
100,196 KB
testcase_25 WA -
testcase_26 AC 286 ms
100,128 KB
testcase_27 AC 289 ms
100,468 KB
testcase_28 AC 286 ms
99,920 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from functools import cmp_to_key
import math
import sys
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
sys.setrecursionlimit(10 ** 6)
inp = sys.stdin.readline
input = lambda : inp().rstrip()
getN = lambda : int(inp())
getNs = lambda : map(int, inp().split())
getList = lambda :list(map(int, inp().split()))
getStrs = lambda n : [input() for _ in [0] * n]
def yexit(): print("Yes"); exit(0)
def nexit(): print("No"); exit(0)
pi = 3.141592653589793
mod = 1000000007
MOD = 998244353
INF = 4611686018427387903
dx = [1, 0, -1, 0];	dy = [0, 1, 0, -1]


"""
Main Code
"""

n = getN()
lis = [True] * (n + 1)
prime = []
for i in range(2, n + 1):
	if not(lis[i]):
		continue
	prime.append(i)
	for j in range(i * 2, n + 1, i):
		lis[j] = False

cnt = 0
x = 1
for i in prime:
	if(cnt == 600):
		break
	y = 1
	while(y * i <= n):
		y *= i
	print("? " + str(y), flush = True)
	s = getN()
	x *= s
	cnt += 1
print("! " + str(x), flush = True)
0