結果
| 問題 | No.338 アンケート機能 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-03-06 17:39:24 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 400 bytes | 
| コンパイル時間 | 507 ms | 
| コンパイル使用メモリ | 71,828 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-23 14:38:20 | 
| 合計ジャッジ時間 | 1,455 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 28 | 
ソースコード
#include <cfloat>
#include <cmath>
#include <iostream>
using namespace std;
int main() {
	double A, B;
	cin >> A >> B;
	double ans = DBL_MAX;
	for (double a = 0.0; a <= 200.0; ++a) {
		for (double b = 0.0; b <= 200.0; ++b) {
			if (a != 0.0 || b != 0.0) {
				if (A == round(100.0 * a / (a + b)) && B == round(100.0 * b / (a + b))) ans = min(a + b, ans);
			}
		}
	}
	cout << ans;
}
            
            
            
        