結果

問題 No.2624 Prediction by Average
ユーザー GOTKAKOGOTKAKO
提出日時 2024-02-09 21:51:15
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 632 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 205,104 KB
実行使用メモリ 232,576 KB
最終ジャッジ日時 2024-02-09 21:51:32
合計ジャッジ時間 12,055 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,432 ms
232,576 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1,304 ms
232,448 KB
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    vector<vector<int>> ok(100001);
    for(int i=1; i<=1000; i++){
        for(long long s=0; s<=i*100; s++){
            long long now = s*1000/i;
            ok.at(now).push_back(i);
        }
    }

    int T; cin >> T;
    while(T--){
        long long N; cin >> N;
        double S; cin >> S;
        long long answer = max(0LL,N-999),T = S*1000;
        N = min(999LL,N);

        for(auto n : ok.at(T)){
            if(n > N) break;
            answer++;
        }
        cout << answer << endl;
    }
}
0