結果

問題 No.338 アンケート機能
ユーザー めうめう🎒
提出日時 2016-01-29 22:52:29
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 699 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 73,532 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-21 18:27:04
合計ジャッジ時間 1,626 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 <= 100;i++){
		for(double j = 1;j <= 100;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 * i / (i + j) + 0.5) == b && (int)(100 * j / (i + j) + 0.5) == a) {
				ans = i + j;
				break;
			}
		}
		if(ans != 0) break;
	}
	cout << ans << endl;
	return 0;
}
0