結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
めうめう🎒
|
| 提出日時 | 2016-01-29 22:53:00 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| 記録 | |
| コンパイル時間 | 680 ms |
| コンパイル使用メモリ | 73,968 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-21 18:27:19 |
| 合計ジャッジ時間 | 1,541 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 2 |
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
int a,b,ans = 0;
cin >> a >> b;
for(double i = 1;i <= 1000;i++){
for(double j = 1;j <= 1000;j++){
if((int)(100 * i / (i + j) + 0.5) == a && (int)(100 * j / (i + j) + 0.5) == b) {
ans = i + j;
break;
}
if((int)(100 * i / (i + j) + 0.5) == b && (int)(100 * j / (i + j) + 0.5) == a) {
ans = i + j;
break;
}
}
if(ans != 0) break;
}
cout << ans << endl;
return 0;
}
めうめう🎒