結果
問題 |
No.2420 Simple Problem
|
ユーザー |
|
提出日時 | 2023-08-12 15:13:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 434 bytes |
コンパイル時間 | 1,782 ms |
コンパイル使用メモリ | 166,272 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-20 00:23:01 |
合計ジャッジ時間 | 19,795 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 WA * 6 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = unsigned long long; using ld = long double; bool hitoshii(ll s,ld sahen){ if(abs((ld)s-(ld)sahen)<=0.0001)return true; return false; } int main(){ ll N;cin >> N; while(N--){ ll A,B;cin >> A >> B; ld sahen = sqrt(A)+sqrt(B); ll s = sahen; if(s<sahen||hitoshii(s,sahen)){cout << s+1 << endl;} else cout << s << endl; } }