結果
| 問題 | No.3102 floor sqrt xor |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-10-26 21:12:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| + 789µs | |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 244 ms |
| コンパイル使用メモリ | 96,112 KB |
| 実行使用メモリ | 84,224 KB |
| 最終ジャッジ日時 | 2026-07-16 00:45:27 |
| 合計ジャッジ時間 | 4,794 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 30 |
ソースコード
from math import isqrt
for _ in range(int(input())):
N = int(input())
sq = isqrt(N)
for n in reversed(range(max(sq-1000, 0), sq+1001)):
k = N^n
if isqrt(k) == n:
print(k)
break
else:
print(-1)
detteiuu