Skip to content

Instantly share code, notes, and snippets.

S = input()
flag = 'WA'
if S[0] == 'A':
ss = S[1]
s = S[2:]
cnt_c = 0
for i in range(len(s)-1):
m = s[i]
if m == 'C':
cnt_c += 1
R = int(input())
if R < 1200:
C = 'ABC'
elif R < 2800:
C = 'ARC'
else:
C = 'AGC'
print(C)
S = input()
w = int(input())
i = 0
while i < len(S):
print(S[i], end="")
i += w
a, b = map(int, input().split())
if a * b == 15:
print("*")
elif a + b == 15:
print("+")
else:
print("x")
N = int(input())
A = list(map(int, input().split()))
print(max(A)-min(A))
N = int(input())
if N % 2 == 1:
m = N * 2
else:
m = N
print(m)
K = input()
h = int(K)
i = 0
num = 1
while h > 0:
i += num
if i >= 9: num = 10
N = input()
S = 0
for i in N:
S += int(i)
if int(N) % S == 0:
print("Yes")
else:
print("No")
S = input()
def is_plus(a):
if a == '+':
return 1
else:
return -1
ans = 0
for i in range(4):
ans += is_plus(S[i])
x = int(input())
m = 1
for i in range(1, x):
for j in range(2, x):
k = pow(i, j)
if k <= x:
m = max(k, m)
else:
break