結果
| 問題 | No.338 アンケート機能 | 
| コンテスト | |
| ユーザー |  めうめう🎒 | 
| 提出日時 | 2016-01-29 22:57:01 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 939 bytes | 
| コンパイル時間 | 650 ms | 
| コンパイル使用メモリ | 73,820 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-21 18:29:35 | 
| 合計ジャッジ時間 | 1,682 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 WA * 2 | 
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
	int a,b,ans = 0;
	cin >> a >> b;
	for(double i = 1;i <= 100000;i++){
		for(double j = 1;j <= 100000;j++){
			if((int)(100 * i / (i + j) + 0.5) == a && (int)(100 * j / (i + j) + 0.5) == b) {
				ans = i + j;
				break;
			}
			if((int)(100 * j / (j + i) + 0.5) == a && (int)(100 * i / (j + i) + 0.5) == b) {
				ans = i + j;
				break;
			}
			if((int)(100 * i / (i + j) + 0.5) == b && (int)(100 * j / (i + j) + 0.5) == a) {
				ans = i + j;
				break;
			}
			if((int)(100 * j / (j + i) + 0.5) == b && (int)(100 * i / (j + i) + 0.5) == a) {
				ans = i + j;
				break;
			}
		}
		if(ans != 0) break;
	}
	cout << ans << endl;
	return 0;
}
            
            
            
        