結果

問題 No.338 アンケート機能
ユーザー めうめう🎒めうめう🎒
提出日時 2016-01-29 22:51:53
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 600 ms
コンパイル使用メモリ 73,592 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-21 18:26:36
合計ジャッジ時間 1,518 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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(ans != 0) break;
	}
	cout << ans << endl;
	return 0;
}
0