結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2016-01-29 22:44:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 636 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 85,384 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 02:49:24 |
合計ジャッジ時間 | 1,627 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<algorithm>#include<bitset>#include<vector>#include<deque>#include<queue>#include<map>#include<set>#include<stack>#include<cmath>#include<iomanip>#include <functional>using namespace std;typedef long long ll;//--------------------------int main(){int a, b;cin >> a >> b;int ans = 1;while (1) {for (int i = 0; i <= ans; i++) {double aa = (i * 100.0 / ans) + 0.5;double bb = (ans - i) * 100.0 / ans + 0.5;if ( (int) aa == a && (int) bb == b) {cout << ans << endl;return 0;}}ans++;}return 0;}