結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2019-01-17 08:29:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 1,505 ms |
コンパイル使用メモリ | 165,792 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 06:51:57 |
合計ジャッジ時間 | 2,664 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 9 |
ソースコード
#define _USE_MATH_DEFINES#include <bits/stdc++.h>using namespace std;int main() {ios::sync_with_stdio(false);cin.tie(0);int a, b;cin >> a >> b;for(int i = 0; i <= 100; i++) {for(int j = 0; j <= 100; j++) {int x = round(100 * 1.0 * i / (1.0 * (i + j)));int y = round(100 * 1.0 * j / (1.0 * (i + j)));if(x == a && y == b) {cout << i + j << endl;return 0;}}}return 0;}