結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2019-01-17 08:29:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 1,568 ms |
コンパイル使用メモリ | 165,916 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 06:51:59 |
合計ジャッジ時間 | 2,526 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#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 <= 1000; i++) {for(int j = 0; j <= 1000; 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;}