Skip to content

Commit 94a5823

Browse files
author
IsHYuhi
committed
ABC61-65
1 parent 9fd9c1d commit 94a5823

File tree

15 files changed

+147
-4
lines changed

15 files changed

+147
-4
lines changed

ABC/ABC045/B.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
dic = {'A':a, 'B':b, 'C':c}
77
pop = dic['A'].popleft().upper()
88

9-
109
while dic[pop]:
1110
pop = dic[pop].popleft().upper()
1211

13-
print(pop)
14-
15-
12+
print(pop)

ABC/ABC061/A.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
a, b, c = map(int, input().split())
2+
3+
if a<=c<=b:
4+
print('Yes')
5+
else:
6+
print('No')

ABC/ABC061/B.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
n, m = map(int, input().split())
2+
3+
ab =[[] for _ in range(n)]
4+
5+
for _ in range(m):
6+
a, b = map(int, input().split())
7+
ab[a-1].append(b-1)
8+
ab[b-1].append(a-1)
9+
10+
for i in ab:
11+
print(len(i))

ABC/ABC061/C.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
n, k = map(int, input().split())
2+
ab = [tuple(map(int, input().split())) for _ in range(n)]
3+
ab.sort(key=lambda x: x[0])
4+
sm = 0
5+
for a, b in ab:
6+
sm += b
7+
if sm >= k:
8+
print(a)
9+
break
10+

ABC/ABC062/A.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
x, y = map(int, input().split())
2+
b = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]
3+
4+
if b[x]==b[y]:
5+
print('Yes')
6+
else:
7+
print('No')

ABC/ABC062/B.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
h, w = map(int, input().split())
2+
3+
field = [input() for _ in range(h)]
4+
5+
print('#'*(w+2))
6+
for f in field:
7+
print('#'+f+'#')
8+
print('#'*(w+2))

ABC/ABC063/A.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
a, b = map(int, input().split())
2+
3+
if a+b>=10:
4+
print('error')
5+
else:
6+
print(a+b)

ABC/ABC063/B.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from collections import Counter
2+
S = input()
3+
Sd = Counter(S)
4+
5+
if len(Sd)==len(S):
6+
print('yes')
7+
else:
8+
print('no')

ABC/ABC063/C.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
n = int(input())
2+
s = [int(input()) for _ in range(n)]
3+
s.sort(reverse=True)
4+
sm = sum(s)
5+
ans = 0
6+
while (sm - ans)%10==0 and s:
7+
now = s.pop()
8+
ans += now
9+
if(sm - now)%10!=0:
10+
ans = now
11+
break
12+
13+
print(sm - ans)

ABC/ABC064/A.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
s = ''.join(list(input().split()))
2+
3+
if int(s)%4==0:
4+
print('YES')
5+
else:
6+
print('NO')

0 commit comments

Comments
 (0)