結果
| 問題 |
No.1700 floor X
|
| コンテスト | |
| ユーザー |
Kiri8128
|
| 提出日時 | 2021-10-08 21:51:34 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 105 ms / 2,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 82,512 KB |
| 実行使用メモリ | 76,684 KB |
| 最終ジャッジ日時 | 2024-07-03 10:16:47 |
| 合計ジャッジ時間 | 6,100 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 44 |
ソースコード
def sqrt(n):
if n == 0: return 0
x = 1 << (n.bit_length() + 1) // 2
y = (x + n // x) // 2
while y < x:
x = y
y = (x + n // x) // 2
return x
T = int(input())
for _ in range(T):
print(sqrt(int(input())))
Kiri8128