結果
| 問題 | No.338 アンケート機能 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-07-08 15:24:13 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 8 ms / 2,000 ms | 
| コード長 | 661 bytes | 
| コンパイル時間 | 594 ms | 
| コンパイル使用メモリ | 79,840 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-06 19:45:00 | 
| 合計ジャッジ時間 | 1,776 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 28 | 
ソースコード
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
int main()
{
	int A, B;
	cin >> A >> B;
	int ans = 100000;
	for (int i = 0; i < 1000; i++) {
		for (int j = 0; j < 1000; j++) {
			if (i == 0 && j == 0)continue;
			int sum = i + j;
			if ((A == round(100 * (double)i / sum)) &&
				(B == round(100 * (double)j / sum))) {
				ans = min(ans,sum);
			}
		}
	}
	cout << ans << endl;
	return 0;
}
            
            
            
        