結果
| 問題 |
No.2624 Prediction by Average
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-09 21:51:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 632 bytes |
| コンパイル時間 | 2,027 ms |
| コンパイル使用メモリ | 195,600 KB |
| 最終ジャッジ日時 | 2025-02-19 03:33:31 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 1 WA * 4 |
ソースコード
#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;
}
}