diff --git a/examples/wip/abc200_b.py b/examples/wip/abc200_b.py new file mode 100644 index 00000000..21418d5b --- /dev/null +++ b/examples/wip/abc200_b.py @@ -0,0 +1,19 @@ +# https://atcoder.jp/contests/abc200/tasks/abc200_b + +from typing import * + +def solve(n: int, k: int) -> int: + for _ in range(k): + if n % 200 == 0: + n //= 200 + else: + n = n*1000 + 200 + return n + +def main() -> None: + n, k = map(int, input().split()) + ans = solve(n, k) + print(ans) + +if __name__ == '__main__': + main() diff --git a/examples/wip/abc203_b.py b/examples/wip/abc203_b.py new file mode 100644 index 00000000..bfa29ebe --- /dev/null +++ b/examples/wip/abc203_b.py @@ -0,0 +1,19 @@ +# https://atcoder.jp/contests/abc203/tasks/abc203_b + +from typing import * + +def solve(n: int, k: int) -> int: + a = [] + for i in range(1,n+1): + for j in range(1,k+1): + a.append(100*i + j) + ans = sum(a) + return ans + +def main() -> None: + n, k = map(int, input().split()) + ans = solve(n, k) + print(ans) + +if __name__ == '__main__': + main() diff --git a/examples/wip/abc204_b.py b/examples/wip/abc204_b.py new file mode 100644 index 00000000..2c4de92e --- /dev/null +++ b/examples/wip/abc204_b.py @@ -0,0 +1,20 @@ +# https://atcoder.jp/contests/abc204/tasks/abc204_b + +from typing import * + +def solve(n: int, a: List[int]) -> int: + ans = 0 + for e in a: + if e > 10: + ans += e - 10 + return ans + +def main() -> None: + n = int(input()) + a = list(map(int, input().split())) + assert len(a) == n + ans = solve(n, a) + print(ans) + +if __name__ == '__main__': + main() diff --git a/examples/wip/abc206_b.py b/examples/wip/abc206_b.py new file mode 100644 index 00000000..3f6e1670 --- /dev/null +++ b/examples/wip/abc206_b.py @@ -0,0 +1,22 @@ +# https://atcoder.jp/contests/abc206/tasks/abc206_b + +from typing import * + +def solve(n: int) -> int: + c = 0 + ans = 0 + flag = True + for i in range(100000): # (10^5)^2 > 10^9 + c += i + if c >= n and flag: + ans = i + flag = False + return ans + +def main() -> None: + n = int(input()) + ans = solve(n) + print(ans) + +if __name__ == '__main__': + main() diff --git a/examples/wip/abc207_b.py b/examples/wip/abc207_b.py new file mode 100644 index 00000000..4249edc4 --- /dev/null +++ b/examples/wip/abc207_b.py @@ -0,0 +1,17 @@ +# https://atcoder.jp/contests/abc207/tasks/abc207_b + +from typing import * + +def solve(a: int, b: int, c: int, d: int) -> int: + ans = -1 + if d*c - b > 0: + ans = (a + d*c - b - 1) // (d*c - b) # ans = a /^ (d*c - b) + return ans + +def main() -> None: + a, b, c, d = map(int, input().split()) + ans = solve(a, b, c, d) + print(ans) + +if __name__ == '__main__': + main() diff --git a/examples/wip/abc208_b.py b/examples/wip/abc208_b.py new file mode 100644 index 00000000..819a72ca --- /dev/null +++ b/examples/wip/abc208_b.py @@ -0,0 +1,23 @@ +# https://atcoder.jp/contests/abc208/tasks/abc208_b + +from typing import * + +def solve(p: int) -> int: + e = 1 + cs = [] + ans = 0 + for i in range(10): + e *= i+1 + cs.append(e) + for c in reversed(cs): + ans += p//c + p -= p//c * c + return ans + +def main() -> None: + p = int(input()) + ans = solve(p) + print(ans) + +if __name__ == '__main__': + main()