結果

問題 No.2420 Simple Problem
ユーザー えらーめぐ
提出日時 2023-08-12 15:09:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 1,777 ms
コンパイル使用メモリ 165,904 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-19 23:52:56
合計ジャッジ時間 19,973 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 27 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = unsigned long long;
using ld = long double;
int main(){
    ll N;cin >> N;
    while(N--){
        ll A,B;cin >> A >> B;
        ld sahen = sqrt(A)+sqrt(B);
        int s = sahen;
        if(s<=sahen){cout << s+1 << endl;}
        else cout << s << endl;
    }
}
0