結果
問題 |
No.2420 Simple Problem
|
ユーザー |
![]() |
提出日時 | 2023-08-25 14:46:08 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 246 bytes |
コンパイル時間 | 400 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 77,184 KB |
最終ジャッジ日時 | 2024-12-23 23:18:14 |
合計ジャッジ時間 | 25,410 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 WA * 6 |
ソースコード
from math import ceil, sqrt n = int(input()) for i in range(n): a, b = map(int, input().split()) print( ceil(sqrt(a) + sqrt(b)) if sqrt(a) + sqrt(b) != int(sqrt(a) + sqrt(b)) else int(sqrt(a) + sqrt(b)) + 1 )