結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2016-02-20 18:57:49 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 87 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-11-08 03:04:01 |
合計ジャッジ時間 | 1,514 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
# coding: utf-8#yuki_338import sysep=0.000001def myround(n1,n2):x1=100.0*n1/(n1+n2)y1=x1+0.5z1=int(y1+ep)x2=100.0*n2/(n1+n2)y2=x2+0.5z2=int(y2+ep)return z1,z2s=map(int,raw_input().split())a=s[0]if a==0:print 1sys.exit()b=s[1]if b==0:print 1sys.exit()for i in xrange(1,201):for j in xrange(1,201):z1,z2=myround(i,j)if z1==a and z2==b:print i+jsys.exit()