結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-08-27 15:06:09 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 701 bytes |
| 記録 | |
| コンパイル時間 | 1,677 ms |
| コンパイル使用メモリ | 68,832 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 19:18:30 |
| 合計ジャッジ時間 | 2,222 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
int i = 1, j = 1, ta, tb;
int m = 205;
while(1){
if (i == 101) break;
while(1) {
if (j == 101) break;
if (i * 1000 / (i + j) % 10 >= 5) ta = i * 100 / (i + j) +1;
else ta = i * 100 / (i + j);
if (j * 1000 / (i + j) % 10 >= 5) tb = j * 100 / (i + j) + 1;
else tb = j * 100 / (i + j);
if (ta == A && tb == B) {
m = min((i+j), m);
break;
}
j++;
}
i++;
j = 1;
}
cout << m << endl;
return 0;
}
prog470