結果

問題 No.338 アンケート機能
ユーザー koba-e964
提出日時 2016-01-30 02:01:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 907 bytes
コンパイル時間 708 ms
コンパイル使用メモリ 85,904 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-08 02:55:58
合計ジャッジ時間 1,586 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef pair<int, int> PI;
const double EPS=1e-9;



int main(void){
	int a, b;
    cin >> a >> b;
    REP(n, 1, 201) {
        REP(x, 0, n + 1) {
        int ta = (200 * x + n) / n / 2;
        int tb = (200 * (n - x) + n) / n / 2;
        if (ta == a && tb == b) {
            cout << n << endl;
            return 0;
        }
        }
    }
    assert(0);
}
0