結果
問題 | No.338 アンケート機能 |
ユーザー | tonnnura172 |
提出日時 | 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, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log from itertools import accumulate, permutations, combinations, product from operator import itemgetter, mul, add from copy import deepcopy from string import ascii_lowercase, ascii_uppercase, digits from bisect import bisect, bisect_left from heapq import heappush, heappop from functools import reduce, lru_cache from decimal import Decimal, ROUND_HALF_UP def 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 + 7 A, B = MAP() ans = INF for i in range(201): for j in range(201): if i==0 and j==0: continue a = 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)