結果
| 問題 | No.2420 Simple Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-12 15:04:45 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 617 bytes |
| 記録 | |
| コンパイル時間 | 370 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 202,496 KB |
| 最終ジャッジ日時 | 2026-05-14 03:17:12 |
| 合計ジャッジ時間 | 9,050 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 TLE * 2 -- * 29 |
ソースコード
import sys
import logging
import math
from decimal import Decimal, ROUND_FLOOR
input = sys.stdin.readline
logger = logging.getLogger(__name__)
def read():
N = int(input().strip())
AB = []
for i in range(N):
a, b = map(Decimal, input().strip().split())
AB.append((a, b))
return N, AB
def solve(N, AB):
for a, b in AB:
ab = a.sqrt() + b.sqrt()
ans = ab.quantize(Decimal("1."), rounding=ROUND_FLOOR) + 1
print(ans)
if __name__ == "__main__":
inputs = read()
outputs = solve(*inputs)
if outputs is not None:
print("%s" % str(outputs))