Help us understand the problem. What is going on with this article?

# ABC146 感想

More than 1 year has passed since last update.

# AtCoder Beginner Contest 146 に参加しました

## 問題A - Can't Wait for Holiday

A.py
```S = input()

if S == "SUN":
print(7)
elif S == "MON":
print(6)
elif S == "TUE":
print(5)
elif S == "WED":
print(4)
elif S == "THU":
print(3)
elif S == "FRI":
print(2)
else:
print(1)
```

## 問題B - ROT N

Google先生に聞いて`ord()``chr()`を知りました。

これを各文字に対して行うことで答えが求まりました。

B.py
```N = int(input())
S = input()

new_s = []
for c in S:
new_s.append(chr((ord(c) - ord("A") + N) % 26 + ord("A")))

print("".join(new_s))
```

## 問題C - Buy an Integer

PyPyなら通るのでは(?)と思いさらにTLEを重ねてしまいました。

1つの方法に固執し過ぎて二分探索に至るまでに30分を掛けてしまったのは反省。

C.py
```a,b,x = map(int, input().split())

left = 0
right = 10**9 + 1
while right > left + 1:
n = (left + right) // 2
if a * n + b * len(str(n)) <= x:
left = n
else:
right = n

print(left)
```

## 問題D - Coloring Edges on Tree

グラフ問題は見た瞬間に拒否反応が出てしまうので、どこかでしっかり勉強したいと思いつつ中々手を付けられていません...

## まとめ

Why not register and get more from Qiita?
1. We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
2. you can read useful information later efficiently
By "stocking" the articles you like, you can search right away