結果
問題 |
No.2420 Simple Problem
|
ユーザー |
|
提出日時 | 2023-08-12 15:04:45 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 617 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 304,768 KB |
最終ジャッジ日時 | 2024-11-19 23:16:35 |
合計ジャッジ時間 | 93,650 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 TLE * 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))