結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2020-07-17 21:47:37 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 1,909 ms |
コンパイル使用メモリ | 191,728 KB |
最終ジャッジ日時 | 2025-01-11 22:33:41 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define REP(i,n) for(int i=0; i<(int)(n); i++)#define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++)#define ALL(x) (x).begin(), (x).end()const double PI = acos(-1);int main() {ios_base::sync_with_stdio(0);cin.tie(0);int A, B;cin >> A >> B;int n = 10000;for (int a = 0; a <= 200; a++) {for (int b = 0; b <= 200; b++) {if (a + b == 0)continue;if (int(100.0 * a / (a + b) + 0.5) == A && int(100.0 * b / (a + b) + 0.5) == B)n = min(n, a + b);}}cout << n << endl;return 0;}