結果

問題 No.338 アンケート機能
ユーザー kpinkcat
提出日時 2023-11-14 14:32:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 680 bytes
コンパイル時間 2,026 ms
コンパイル使用メモリ 193,684 KB
最終ジャッジ日時 2025-02-17 21:59:35
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;

int main(){
    int a, b;
    cin >> a >> b;
    for (int i = 0; i < 10000; i++){
        int total;
        for (int j=0; j < 10000; j++){
            total = i+j;
            if (!total) continue;
            if ((double) 100*i/total >= a-0.5 && (double) 100*i/total < a+0.5 && (double) 100*j/total >= b-0.5 && (double) 100*j/total < b+0.5){
                cout << total << endl;
                return 0;
            }
        }
    }
}
0