結果
| 問題 | No.338 アンケート機能 | 
| コンテスト | |
| ユーザー |  gotutiyan | 
| 提出日時 | 2018-06-27 19:29:24 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,372 bytes | 
| コンパイル時間 | 714 ms | 
| コンパイル使用メモリ | 93,620 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-30 23:13:22 | 
| 合計ジャッジ時間 | 1,939 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 2 | 
ソースコード
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <numeric>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vec vector
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
#define fcout cout<<fixed<<setprecision(10)
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};
int day[12]={31,28,31,30,31,30,31,31,30,31,30,31};
//template<typename T>void pp(T x){cout<<x<<endl;}
using namespace std;
template<typename T> void test(vector<T> v){for(int i=0;i<v.size();i++){if(i)cout<<" ";cout<<v[i];}cout<<endl;}
int main(){
    int A,B;
    cin>>A>>B;
    int ans=INF;
    rep(i,1,101){
        rep(j,1,101){
            double a=100.0*i/(i+j);
            double b=100.0*j/(i+j);
            a+=0.5; b+=0.5;
            if((int)a==A&&(int)b==B){
                ans=min(ans,i+j);
            }
        }
    }
    if(ans==INF)cout<<200<<endl;
    else cout<<ans<<endl;
    
    return 0;
} 
            
            
            
        