結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2016-05-21 17:09:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 351 ms / 2,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 537 ms |
| コンパイル使用メモリ | 66,176 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 03:09:34 |
| 合計ジャッジ時間 | 12,483 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int a, b; cin>>a>>b;
int res=1<<30;
for(int i=0; i<10000; ++i) {
for(int j=0; j<10000; ++j) if (i+j) {
int x=i*1000/(i+j);
int y=j*1000/(i+j);
if (10*a-5<=x and x<=10*a+4 and 10*b-5<=y and y<=10*b+4)
res=min(res, i+j);
}
}
cout<<res<<endl;
}
hogeover30