結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-08-27 14:51:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 559 bytes |
| 記録 | |
| コンパイル時間 | 955 ms |
| コンパイル使用メモリ | 69,224 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 19:16:48 |
| 合計ジャッジ時間 | 1,813 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 11 |
ソースコード
#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
double i = 1, j = 1;
int m = 205;
while(1){
if (i == 101) break;
while(1) {
if (j == 101) break;
if ((int)(i * 100 /(i + j) + 0.5)== A && (int)(j * 100 /(i + j)+ 0.5) == B) {
m = min((int)(i+j), m);
break;
}
j++;
}
i++;
j = 1;
}
cout << m << endl;
return 0;
}
prog470