結果
問題 | No.338 アンケート機能 |
ユーザー |
![]() |
提出日時 | 2017-06-30 00:12:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 718 bytes |
コンパイル時間 | 884 ms |
コンパイル使用メモリ | 88,500 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 16:56:37 |
合計ジャッジ時間 | 1,495 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include <algorithm>#include <cstdio>#include <iostream>#include <map>#include <cmath>#include <queue>#include <set>#include <sstream>#include <stack>#include <string>#include <vector>#include <stdlib.h>#include <stdio.h>#include <bitset>using namespace std;#define FOR(I,A,B) for(int I = (A); I < (B); ++I)typedef long long ll;int main(){int A, B;cin >> A >> B;int ans = 99999;for(int a = 0; a <= 200; a++) {for(int b = 0; b <= 200; b++) {if(a==0 && b==0) continue;bool ok = true;ok &= A == (100 * a * 10 / (a + b) + 5) / 10;ok &= B == (100 * b * 10 / (a + b) + 5) / 10;if(ok) ans = min(ans, a + b);}}cout << ans << endl;return 0;}