結果
問題 | No.338 アンケート機能 |
ユーザー |
![]() |
提出日時 | 2020-03-05 15:51:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 657 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-14 01:18:08 |
合計ジャッジ時間 | 2,300 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 9 |
ソースコード
def round_off(n):from math import modf,floor,ceildecimal,integer = modf(n)if decimal == 0.5:return floor(n) + 1elif decimal > 0 and decimal < 0.5:return floor(n)else:return ceil(n)A,B = map(int,input().split())k = 0break_loop = Falsefor i in range(1,101):for j in range(i+1):if round_off(100*j/i) == A and round_off(100*(i-j)/i) == B:k = ibreak_loop = Truebreakelif round_off(100*j/i) == B and round_off(100*(i-j)/i) == A:k = ibreak_loop = Truebreakif break_loop:breakprint(k)