結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
takakin
|
| 提出日時 | 2020-05-13 23:07:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 393 bytes |
| コンパイル時間 | 266 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-09-14 15:43:53 |
| 合計ジャッジ時間 | 2,583 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import sys
input=lambda: sys.stdin.readline().rstrip()
a,b=map(int,input().split())
ansa,ansb=float("inf"),float("inf")
for t in range(1,201):
for i in range(t):
aa=(100*i)//t
bb=(100*(t-i))//t
if (100*i-aa*t)*2>=t:
aa+=1
if (100*(t-i)-bb*t)*2>=t:
bb+=1
if aa==a and bb==b:
if t<ansa+ansb:
ansa,ansb=i,t-i
print(1 if min(a,b)==0 else ansa+ansb)
takakin