結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-02 01:03:02 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 935 ms |
| コンパイル使用メモリ | 73,728 KB |
| 実行使用メモリ | 80,128 KB |
| 最終ジャッジ日時 | 2026-04-02 01:03:11 |
| 合計ジャッジ時間 | 2,314 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include<iostream>
#include<cassert>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int A,B;cin>>A>>B;
for(int ab=1;;ab++)
{
for(int a=0;a<=ab;a++)
{
int nA=1000*a/ab,nB=1000*(ab-a)/ab;
if(nA%10>=5)nA=nA/10+1;
else nA=nA/10;
if(nB%10>=5)nB=nB/10+1;
else nB=nB/10;
if(A==nA&&B==nB)
{
cout<<ab<<endl;
return 0;
}
}
}
}