結果
問題 | No.338 アンケート機能 |
ユーザー |
|
提出日時 | 2020-04-28 23:47:56 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 243 ms / 2,000 ms |
コード長 | 1,099 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-11-26 01:05:36 |
合計ジャッジ時間 | 8,625 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
import sys, refrom collections import deque, defaultdict, Counterfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, logfrom itertools import accumulate, permutations, combinations, productfrom operator import itemgetter, mul, addfrom copy import deepcopyfrom string import ascii_lowercase, ascii_uppercase, digitsfrom bisect import bisect, bisect_leftfrom heapq import heappush, heappopfrom functools import reduce, lru_cachefrom decimal import Decimal, ROUND_HALF_UPdef input(): return sys.stdin.readline().strip()def INT(): return int(input())def MAP(): return map(int, input().split())def LIST(): return list(map(int, input().split()))def ZIP(n): return zip(*(MAP() for _ in range(n)))sys.setrecursionlimit(10 ** 9)INF = float('inf')mod = 10 ** 9 + 7A, B = MAP()ans = INFfor i in range(201):for j in range(201):if i==0 and j==0: continuea = Decimal(100*i/(i+j)).quantize(Decimal("1"), rounding=ROUND_HALF_UP)b = Decimal(100*j/(i+j)).quantize(Decimal("1"), rounding=ROUND_HALF_UP)if a == A and b == B:ans = min(ans, i+j)print(ans)