ABC152 - Atcoder/Python精進のための解説メモ
2022/06/20
ABC152 - A.AC or WA
AtCoder公式 | ABC152 - A.AC or WA解答
n, m = map(int, input().split())
print('Yes' if n == m else 'No')
要点解説メモ
- シンプルに解く
ABC152 - B.Comparing Strings
AtCoder公式 | ABC152 - B.Comparing Strings解答
a, b = map(int, input().split())
s = str(a) * b
t = str(b) * a
print(min(s, t))
要点解説メモ
- minで比較できちゃう
- sortしても良い
ABC152 - C.Low Elements
AtCoder公式 | ABC152 - C.Low Elements解答
n = int(input())
ppp = list(map(int, input().split()))
tmp_min = 1e9
cnt = 0
for p in ppp:
if p < tmp_min:
cnt += 1
tmp_min = p
print(cnt)
要点解説メモ
- 各値Aiが、A1~Aiの中で最小なら条件を満たす
- pを先頭から確認していき、その時点での最小値を記録しながら、最小値の場合を数えればよい
ABC152 - D.
AtCoder公式 | ABC152 - D.解答
まだ解いていません