Skip to content

Commit 5506939

Browse files
author
IsHYuhi
committed
ABC76-80
1 parent ccab53f commit 5506939

File tree

11 files changed

+70
-0
lines changed

11 files changed

+70
-0
lines changed

ABC/ABC076/A.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
r = int(input())
2+
g = int(input())
3+
4+
print(-r+2*g)

ABC/ABC076/B.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
n = int(input())
2+
k = int(input())
3+
ans = 1
4+
for i in range(n):
5+
ans = min(ans*2, ans+k)
6+
print(ans)

ABC/ABC077/A.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
c1 = input()
2+
c2 = input()
3+
4+
if c1==c2[::-1] and c2==c1[::-1]:
5+
print('YES')
6+
else:
7+
print('NO')

ABC/ABC077/B.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import math
2+
n = int(input())
3+
print(int(math.sqrt(n))**2)

ABC/ABC078/A.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
x, y = input().split()
2+
3+
if ord(x)<ord(y):
4+
print('<')
5+
elif ord(x)>ord(y):
6+
print('>')
7+
else:
8+
print('=')

ABC/ABC078/B.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
x, y, z = map(int, input().split())
2+
print((x-z)//(y+z))

ABC/ABC078/C.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
n, m = map(int, input().split())
2+
3+
print(((1900*m)+(n-m)*100)*2**m)

ABC/ABC079/A.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from collections import deque
2+
n = deque(list(input()))
3+
digit = n.popleft()
4+
cnt = 1
5+
while n:
6+
if cnt == 3:
7+
break
8+
d = n.popleft()
9+
if d == digit:
10+
cnt += 1
11+
else:
12+
digit = d
13+
cnt = 1
14+
15+
if cnt == 3:
16+
print('Yes')
17+
else:
18+
print('No')

ABC/ABC079/B.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
n = int(input())
2+
l = [0]*(n+1)
3+
l[0]=2
4+
l[1]=1
5+
def lucas_number(n):
6+
if l[n]!=0:
7+
return l[n]
8+
l[n] = lucas_number(n-1)+lucas_number(n-2)
9+
return l[n]
10+
print(lucas_number(n))

ABC/ABC080/A.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
n, a, b = map(int, input().split())
2+
print(min(n*a, b))

ABC/ABC080/B.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
n = int(input())
2+
d = list(map(int, list(str(n))))
3+
4+
if n%sum(d)==0:
5+
print('Yes')
6+
else:
7+
print('No')

0 commit comments

Comments
 (0)