Problem:


Score : 100 points

Problem Statement

An uppercase or lowercase English letter \alpha will be given as input.
If \alpha is uppercase, print A; if it is lowercase, print a.

Constraints

\alpha is an uppercase (A - Z) or lowercase (a - z) English letter.

Input

Input is given from Standard Input in the following format:

α

Output

If \alpha is uppercase, print A; if it is lowercase, print a.

Sample Input 1

B

Sample Output 1

A

B is uppercase, so we should print A.

Sample Input 2

a

Sample Output 2

a

a is lowercase, so we should print a.



Sample input:
B


Sample output:
A

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
a = np.fromstring(input(), sep=" ", dtype=np.int64)
b = np.bitwise_xor.reduce(a)
for n in range(N):
    print(b ^ a[n])

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
input = sys.stdin.readline
N = int(input())
ab = [chr(ord('a') + i) for i in range(26)]
j = 1
while True:
  temp = 1000000000000001//(26**j)
  j+=1
  if temp<1:
    break
ans = ''
for i in range(1, j+2):
  ax = (N//(26**(i-1)))%26
  if ax==0:
    ax = 25
  ans += ab[ax]
  if N//(26**i)<1:
    print(ans[::-1])
    sys.exit()

Submission status: Runtime Error

Solution code:
num = int(input())
d = {"a":1,"b":2,"c":3,"d":4,"e":5,"f":6,"g":7,"h":8,"i":9,"j":10,"k":11,"l":12,"m":13,"n":14,"o":15,"p":16,"q":17,"r":18,"s":19,"t":20,"u":21,"v":22,"w":23,"x":24,"y":25,"z":0}
op_d = {}
for i,j in d.items():
    op_d[j] = i
ans =""
for i in list(range(0,12))[::-1]:
    if(int(num/(26**i)) == 0 ):
        pass
    else:
        ans += op_d[int(num/(26**i))]
        num = num % 26**i;
print(ans)

Submission status: Runtime Error

Solution code:
literal = ('a', 'b', 'c', 'd', 'e', 'f', 
           'g', 'h', 'i', 'j', 'k', 'l', 
           'm', 'n', 'o', 'p', 'q', 'r', 
           's', 't', 'u', 'v', 'w', 'x', 
           'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
if x < 27:
    str3 = literal[x-1]
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Submission status: Runtime Error

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
q = int(input())

for i in range(q):
    b, c = map(int, input().split())
    newlist = a_list
    for j in range(n):
        if newlist[j] == b:
          newlist[j] = c
          ans = sum(newlist)
    print(ans)

Submission status: Runtime Error

Solution code:
n = input()
m = n.split()
print(m)
a = [input() for l in range(0,1)]
b = a[0].split()
print(b)

for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)
print(c)
p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
  N = int(input())
  A = [int(x) for x in input().split()]
  Q = int(input())
  for i in range(Q):
    A.sort()
    B, C = [int(x) for x in input().split()]
    A = [x if x!=B else C for x in A]
    print(sum(A))

Submission status: Runtime Error

Solution code:
n = int(input())
A = list(map(int, input().split()))
q = int(input())

total = sum(A)
dic = {}
for i in range(q):
  b, c = map(int, input().split())
  b_count = A.count(b)
  c_count = A.count(c)
  dic[c] = c_count + b_count
  if b in dic:
    b_count = dic[b]
  diff = c - b
  total += b_count*diff
  print(total)

Submission status: Runtime Error

Solution code:
n = int(input())
a_list = list(map(int, input().split()))
q = int(input())

for i in range(q):
    b, c = map(int, input().split())
    newlist = a_list
    for j in range(n):
        if newlist[j] == b:
          newlist[j] = c
          ans = sum(newlist)
    print(ans)

Submission status: Runtime Error

Solution code:
n = int(input()) 
a = [0 for i in range(15)]
alf = "abcdefghijklmnopqrstuvwxyz" 
hasStarted = False
hasFound = False
for j in range(14, -1, -1):
	rem = n // (26**j)
	if rem == 0:
		continue
	else:
		a[j] = rem
		n -= rem*(26**j)
a.reverse()
res = ""
for c in a:
	if hasStarted:
		if c == 0:
			res += "z"
		else:
			res += alf[c-1]
	else:
		if c != 0:
			res += alf[c-1]
			hasStarted = True

print(res)

Submission status: Runtime Error

Solution code:
N = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
output = ""
while N >= 26:
    mod = N % 26
    N = N / 26
    output = alpha[mod-1] + output
output = alpha[N-1] + output
print(output)

Submission status: Runtime Error

Solution code:
alpha = input()
upperCase = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q','R', 'S', 'T', 'U', 'V', 'W', 'X',Y','Z']
lowerCase = ['a','b', 'c', 'd', 'e','f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'o','p', 'q', 'r', 's','t', 'u', 'v', 'w', 'x', 'y', 'z']
if alpha in upperCase:
             print("Upper Case")
if alpha in lowerCase:
             print("Lower Case")

Submission status: Runtime Error

Solution code:
literal = ('a', 'b', 'c', 'd', 'e', 'f', 
           'g', 'h', 'i', 'j', 'k', 'l', 
           'm', 'n', 'o', 'p', 'q', 'r', 
           's', 't', 'u', 'v', 'w', 'x', 
           'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
for _ in range(Q):
    B,C = map(int, input().split())
A.sort()
ans = 0
for a in range(Q) :
    x=C if A=B else 0
    ans = sum(A)
print(ans)

Submission status: Runtime Error

Solution code:
literal = ('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
           'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z')
x = int(input())
str2 = ''
str3 = ''
q = x
while q > 26:
    q, mod = divmod(x, 26)
    str1 = ''
    if q > 26:
        x = q
        str1 = literal[mod - 1]
        str3 = str1 + str2
        str2 = str3
        str3 = ''
    else:
        str1 += literal[q - 1]
        str1 += literal[mod - 1]
        str3 = str1 + str2
print(str3)

Submission status: Runtime Error

Solution code:
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
Q = int(input())
s = Counter(A)
t=[0]*(10**5+1)
for i in range(10**5+1):
    t[i] = s[i]*i
    
for i in range(Q):
    B, C = map(int, input().split())
    num = t[B]//(B)
    t[B] = 0
    t[C] += num*(C)
    print(sum(t))

Submission status: Runtime Error

Solution code:
num = int(input())
strng = ""
while num >= 1 :
    kalan = num % 26
    if(kalan==0):
      strng = "z" +strng
    else:
    	strng = chr(96+kalan)+strng
    num = num // 26
print(strng)

Submission status: Runtime Error

Solution code:
n = int(input())

keta = 0
tmp = 26
beki = [26]

while True:
    if n <= beki[-1]:
        break
    tmp *= 26
    beki.append(beki[-1] + tmp)
    keta += 1
n_tmp = n
ans_num = []

n_tmp -= beki[keta - 1] + 1
for i in range(keta):
    waru = 26**(keta - i)
    x = (n_tmp) // waru
    ans_num.append(x)
    n_tmp -= x * waru

ans_num.append(n_tmp)
ans = ''

for d in ans_num:
    ans += chr(d + 97)

if n <= 26:
    print(chr(n + 96))
else:
    print(ans)

Submission status: Runtime Error

Solution code:
N=0

N = int(input())
K = int(input())
p = [int(input()) for i in range(N)]

p.sort()
print(sum(p[0:K]))

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(str,input().split()))
Q = int(input())
b = []
c = []
for i in range(Q):
    B,C = map(str,input().split())
    b.append(B)
    c.append(C)

for i in range(Q):
    if b[i] in A:
        A = [s.replace(b[i],c[i]) for s in A]
    print(sum(int(i) for i in A))

Submission status: Runtime Error

Solution code:
num = int(input())
strng = ""
while num >= 1 :
    kalan = num % 26
    strng = chr(97+kalan-1)+strng
    num = num // 26
print(strng)

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(x) for x in input().split()]
q = int(input())
for i in range(q):
  a.sort()
  su = 0
  b,c = map(int,input().split())
  for j in range(n):
    if(a[j] > b ):
      break
    if(a[j] == b):
      a[j] = c
    su += a[j]
  print(su)

Submission status: Runtime Error

Solution code:
n = int(input())
c = 0
n1 = 0
n1 += n
for i in range(1,12):
    a = n1 - 26**(i)
    c += 1
    if a <= 0:
        break
    n1 = n1 - 26**(i)
a = ""
for i in range(c):
    if n // 26**(c-i-1) >= 26:
        alpha = 26
        n = n - 26**(c-i)
    else:
        alpha = n // 26**(c-i-1)
        n = n % 26**(c-i-1)
    a += chr(96 + alpha)
print(a)

Submission status: Runtime Error

Solution code:
n = int(input())

from scipy.special import comb


def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

print(num2alpha(n).lower())

Submission status: Runtime Error

Solution code:
def main():
  apple = input()    
  if (apple >= 'A' and apple <= 'Z'):
    print('A')
  elif (apple >= 'a' and apple <= 'z'):
    print('a')
  else:
    print('')
return main()

Submission status: Runtime Error

Solution code:
def main(apple):
  apple = input()    
  if (apple >= 'A' and apple <= 'Z'):
    print('A')
  elif (apple >= 'a' and apple <= 'z'):
    print('a')
  else:
    print('')
return main()

Submission status: Runtime Error

Solution code:
a = str(input())
if a = ('A'-'Z'):
    print('A')
elif a = ('a'-'z'):
    print('a')

Submission status: Runtime Error

Solution code:
def main():
    n = int(input())
    alphabets = [None] + [chr(ord("a") + x) for x in range(26)]
    # 1~26:１桁
    # 27 ~ 702(26**2*"1"+26**1*"1"+ 0):2桁
    # 27 ~ 52番：aa ~ az(26+1~26)
    # 53 ~ 78番：ba ~ bz(26*"2"+"1~26")
    # 703 ~ 18278(26+26*26+26*26*26):３桁
    # 703 ~ 726: aaa ~ aaz(26**2*"1"+26*"1"+"1~26")

    #何桁か？
    cnt = 0
    m = n
    while m > 0:
        cnt += 1
        m -= 26 ** cnt
    #print(cnt)

    # 各桁がどの文字か？
    num = []
    for i in range(cnt):
        # 最初は、26で割り、次は
        y = n % (26 ** (i+1))
        #print("amari:", y, "nokori:", n)
        if y == 0:
          num += [26]
        else:
          n -= y
          num += [y // (26**i)]

    #print(num)

    ans = ""
    for s in num[::-1]:
        ans += alphabets[s]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
if α.isupper() = True :
  print("A")
else:
  print("B")

Submission status: Runtime Error

Solution code:
def main(ch):
  apple = input()    
  if (apple >= 'A' and apple <= 'Z'):
    print('A')
  elif (apple >= 'a' and apple <= 'z'):
    print('a')
  else:
    print('')
return main()

Submission status: Runtime Error

Solution code:
a = input()
 
if str.isupper(a):
  print('A')
else :
  ptint('a')

Submission status: Runtime Error

Solution code:
# coding: utf-8

N = int(input())
A = list(map(int, input().split()))

A.sort()

dict_a = dict()

for a in A:
    if not (a in dict_a):
        dict_a[a] = 1
    else:
        dict_a[a] += 1


Q = int(input())

B = []
C = []

sums = []
for i in range(Q):
    b, c = list(map(int, input().split()))
    B.append(b)
    C.append(c)

for b, c in zip(B, C):
    if (b in dict_a):
        num = dict_a[b]
    
        if not (c in dict_a):
            dict_a[c] = num
        else:
            dict_a[c] += num

        dict_a.pop(b)

    keys = dict_a.keys()
    vals = dict_a.values()

    sumval = 0
    for k, v in zip(keys, vals):
        sumval += k * v

    print(sumval)

Submission status: Runtime Error

Solution code:
alpga = input()
if alpha == isupper():
  print('A')
else:
  print('a')

Submission status: Runtime Error

Solution code:
import numpy as np
import sys
N=int(sys.stdin.readline())
A=list(map(int,sys.stdin.readline().split()))
Q=int(sys.stdin.readline())
AA=set(A)
A=np.array(A)
b=[]
c=[]
for _ in range(Q):
  B,C=map(int,sys.stdin.readline().split())
  if B in AA:
    A[A==B]=C
    AA.add(C)
  print(sum(A))

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
li = list(input().split())

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Submission status: Runtime Error

Solution code:
X=int(input())
n=26

a=[]
X_dumy = X
out = ''
while X_dumy>0:
  out = str(X_dumy%n)
  X_dumy = int(X_dumy/n)
  a.append(out)

l = list('abcdefghijklmnopqrstuvwxyz')
N=0
for x in a:
  a[N]=l[int(a[N])-1]
  N=N+1
pg = ''.join(a)
print(pg)

Submission status: Runtime Error

Solution code:
a = input()
 
if str.isupper(a):
  print("A")
else :
  ptint("a")

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
li = list(input().split())

new_list = sorted(li)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Submission status: Runtime Error

Solution code:
import sys
n = int(input())
an = list(map(int, sys.stdin.readline().rstrip().split()))
q = int(input())

import numpy as np

sum = np.sum(an)


for _ in range(q):
    b,c = map(int, input().split())
    for i in range(n):
        if b == an[i]:
            an[i]=c
            sum += c-b
    print(sum)

Submission status: Runtime Error

Solution code:
N=int(input())
number=list(map(int,input().split()))
Q=int(input())
for i in range(Q):
    B,C=map(int,input().split())
    if B in number:
        for i in range(N):
            if number[i]==B:
                number[i]=C
    print(sum(number))

Submission status: Runtime Error

Solution code:
S=input()

if S == a:
    print('a')
elif S == b:
    print('a')
elif S == c:
    print('a')
elif S == d:
    print('a')
elif S == e:
    print('a')
elif S == f:
    print('a')
elif S == g:
    print('a')
elif S == h:
    print('a')
elif S == i:
    print('a')
elif S == j:
    print('a')
elif S == k:
    print('a')
elif S == l:
    print('a')
elif S == m:
    print('a')
elif S == n:
    print('a')
elif S == o:
    print('a')
elif S == p:
    print('a')
elif S == q:
    print('a')
elif S == r:
    print('a')
elif S == s:
    print('a')
elif S == t:
    print('a')
elif S == u:
    print('a')
elif S == v:
    print('a')
elif S == w:
    print('a')
elif S == x:
    print('a')
elif S == y:
    print('a')
elif S == z:
    print('a')
else:
    print('A')

Submission status: Runtime Error

Solution code:
x = str(input())
if x.isupper() == True:
  print(A)
else:
  print(a)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
list = list(input().split())

new_list = sorted(list)

print(new_list)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
l=list(map(int,input().split()))
s=0
l.sort()
x=l[:m]
   
print(sum(x))

Submission status: Runtime Error

Solution code:
if(input().isupper()):
  print('A')
else if(input().islower()):
  print('a')

Submission status: Runtime Error

Solution code:
def main():
    nmax = 100000
    n = int(input())
    values = [0] * nmax
    a = [int(v) for v in input().split()]
    for v in a:
        values[v-1] += 1
    asum = sum(a)

    q = int(input())
    for _ in range(q):
        b, c = [int(v) for v in input().split()]
        asum += values[b-1] * (c - b)
        values[c-1] += values[b-1]
        values[b-1] = 0
        print(asum)

main()

Submission status: Runtime Error

Solution code:
a = str(input())
if a == isupper():
    print('A')
elif a == islower():
    print('a')

Submission status: Runtime Error

Solution code:
x = str(input())
if x.isupper():
  print(A)
else:
  print(a)

Submission status: Runtime Error

Solution code:
a = str(input())
if a.isupper():
  print(A)
else:
  print(a)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
         
P = list(map(int, input().split()))

P.sort()

ans = 0
for i in range(K):
    ans += P[i]
    
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
list_in = list(map(int, input().split()))
q = int(input())
for i in range(q):
    bc = list(map(int, input().split()))
    for j in range(n):
        if list_in[j] == bc[0]:
            list_in[j] = bc[1]
    print(sum(list_in))

Submission status: Runtime Error

Solution code:
n=int(input())
i=1
a=0
m=n
while n-26**i>0:
    n=n-26**i
    i+=1
    a+=n**i #桁数
a #最小
ans=""
b=0
l=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for j in range(i):
    b=m%26
    m=m//26
    if b==0:
      m=m-1
    ans=l[b-1]+ans
print(ans)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    pass


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()
    
    
n = int(input())
a = list(map(int, input().split()))
for i in range(int(input())):
    x, y = map(int, input().split())
    for b in range(len(a)):
        if a[b] == x:
            a[b] = y
    print(sum(a))

Submission status: Runtime Error

Solution code:
n = int(input())
if ord('n')>90:
  print('a')
else:
  print("A")

Submission status: Runtime Error

Solution code:
a = input()

if str.isupper(a) == ture :
  print("A")
else :
  ptint("a")

Submission status: Runtime Error

Solution code:
a = input()
print('A') if c.isupper() is True else print('a')

Submission status: Runtime Error

Solution code:
def sum_dict(d, sum, b, c):
    val = 0
    if b in d:
        val = d[b]
        sum -= (b * val)
        del d[b]
        d[c] = d.get(c, 0) + val
        sum += (c * val)
    return sum, d
    
n = int(input())
a = [int(x) for x in input().split()]
d = {}
for i in a:
    d[i] = d.get(i, 0) + 1
s = sum(a)
q = int(input())
for i in range(q):
    b, c = map(int, input().split())
    s, d = sum_dict(d, s, b, c)
    print(s)

Submission status: Runtime Error

Solution code:
a = input()
print('A') if c.isupper() is True else print('B')

Submission status: Runtime Error

Solution code:
if(input().isupper()):
  print('A')
elif(input().islower()):
  print('a')

Submission status: Runtime Error

Solution code:
N=int(input())
A=[int(i) for i in input().split()]
Q=int(input())
X=[i+1 for i in range((10**5))]
dic={}
ans=sum(A)
for i in A:
	try:
		dic[i]+=1
	except:
		dic.setdefault(i,1)
for i in range(Q):
	[B,C]=[int(i) for i in input().split()]
	try:
		ans+=dic[B]*(C-B)
		try:
			dic[C]+=dic[B]
		except:
			dic.setdefault(C,dic[B])
		dic[B]=0
	except:
		ans+=0

	print(ans)

Submission status: Runtime Error

Solution code:
num = int(input())
line = []

while num >= 27:
  amari = num%26
  num = num//26
  line.append(amari)
if num < 27:
  line.append(num)

  
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
line.reverse()
for k in line:
  print(alpha[int(k)-1], end = "")

Submission status: Runtime Error

Solution code:
x = input()
if x.isupper() == True:
  print(A)
else:
  print(a)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
q = int(input())
bc = [list(map(int, input().split())) for i in range(q)]
for f in bc:
    a = [f[1] if j == f[0] else j for j in a]
    print(sum(a))

Submission status: Runtime Error

Solution code:
a = input(α)
b = a.isupper()
print(b)
if b == True:
    print("A")
else:
    print("a")

Submission status: Runtime Error

Solution code:
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
B = [0]*Q
C = [0]*Q
S = [0]*Q
for i in range(Q):
    B[i], C[i] = map(int, input().split())

for i in range(Q):
    A_replace = [C[i] if a == B[i] else a for a in A]

    A = A_replace
    S[i] = sum(A_replace)

for i in range(Q):
    print(S[i])

Submission status: Runtime Error

Solution code:
N=int(input())
i=0
x=""
while(N > 26**i):
    i +=1
i -= 1
while(i!=-1):
    if(N//26**i==26):
        x += "z"
        N=N-(26**i)*26
    elif(N//26**i==1):
        x += "a"
        N=N-(26**i)
    elif(N//26**i==2):
        x += "b"
        N=N-(26**i)*2
    elif(N//26**i==3):
        x += "c"
        N=N-(26**i)*3
    elif(N//26**i==4):
        x += "d"
        N=N-(26**i)*4    
    elif(N//26**i==5):
        x += "e"
        N=N-(26**i)*5
    elif(N//26**i==6):
        x += "f"
        N=N-(26**i)*6
    elif(N//26**i==7):
        x += "g"
        N=N-(26**i)*7
    elif(N//26**i==8):
        x += "h"
        N=N-(26**i)*8
    elif(N//26**i==9):
        x += "i"
        N=N-(26**i)*9
    elif(N//26**i==10):
        x += "j"
        N=N-(26**i)*10
    elif(N//26**i==11):
        x += "k"
        N=N-(26**i)*11
    elif(N//26**i==12):
        x += "l"
        N=N-(26**i)*12
    elif(N//26**i==13):
        x += "m"
        N=N-(26**i)*13
    elif(N//26**i==14):
        x += "n"
        N=N-(26**i)*14    
    elif(N//26**i==15):
        x += "o"
        N=N-(26**i)*15
    elif(N//26**i==16):
        x += "p"
        N=N-(26**i)*16
    elif(N//26**i==17):
        x += "q"
        N=N-(26**i)*17
    elif(N//26**i==18):
        x += "r"
        N=N-(26**i)*18
    elif(N//26**i==19):
        x += "s"
        N=N-(26**i)*19
    elif(N//26**i==20):
        x += "t"
        N=N-(26**i)*20
    elif(N//26**i==21):
        x += "u"
        N=N-(26**i)*21
    elif(N//26**i==22):
        x += "v"
        N=N-(26**i)*22
    elif(N//26**i==23):
        x += "w"
        N=N-(26**i)*23
    elif(N//26**i==24):
        x += "x"
        N=N-(26**i)*24    
    elif(N//26**i==25):
        x += "y"
        N=N-(26**i)*25
    i -= 1
print(x)

Submission status: Runtime Error

Solution code:
n = int( input() )
 
l = []
a = 97
alp = 26
k = 1
n2 = n
while n >= k + 1:
  l.append( ( n2 - 1 ) % alp  )
  n2 = ( n2 - ( n2 - 1 ) % alp ) // alp
  k *= alp
ret = ""
for c in reversed( l ):
  ret += chr( a + c )
print( ret )

Submission status: Runtime Error

Solution code:
str alpha=input()
if (alpha.isupper()){
  print(A)
}else{
  print(a)
}

Submission status: Runtime Error

Solution code:
str alpha='B'
if (alpha.isupper()){
  print(A)
}else{
  print(a)
}

Submission status: Runtime Error

Solution code:
str alpha=input()
if (alpha.isupper()){
  print(A)
}else{
  print(B)
}

Submission status: Runtime Error

Solution code:
alpha = input()
if alpha.isupper() == True:
    print(aplha.lower())
else :
    print(alpha.upper())

Submission status: Runtime Error

Solution code:
S = input()
if S == ([A-Z])
    print('a')
else:
    print('A')

Submission status: Runtime Error

Solution code:
str alpha='B'
if (alpha.isupper()){
  print(A)
}else{
  print(B)
}

Submission status: Runtime Error

Solution code:
n=int(input())
def num2alpha(num):
  if num<=26:
    return chr(64+num)
  elif num%26==0:
    return num2alpha(num//26-1)+chr(90)
  else:
    return num2alpha(num//26)+chr(64+num%26)
print(num2alpha(n).lower())

Submission status: Runtime Error

Solution code:
print('a' if s.islower() else 'A')

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
list = list(input().split(' '))

new_list = sorted(list)

j = 0
i = 0

while i <= k-1:
  j += int(new_list[i])
  i += 1

print(j)

Submission status: Runtime Error

Solution code:
import numpy as np
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
A=np.array(A)
for _ in range(Q):
  B,C=map(int,input().split())
  A[A==B]=C
  print(sum(A))

Submission status: Runtime Error

Solution code:
alpha='B'
if (alpha.isupper()){
  print(A)
}else{
  print(B)
}

Submission status: Runtime Error

Solution code:
n=int(input())
if n.islower():
  print('a')
else:
  print('A')

Submission status: Runtime Error

Solution code:
alp = str(input())
print "A" if alp.isupper() == True else print "a"

Submission status: Runtime Error

Solution code:
N = int(input())
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
print(num2alpha(N).lower())

Submission status: Runtime Error

Solution code:
S = input()
if S == (a or b or c or d or e or f or g or h or i or j or k or l or m or n or o or p or q or r or s or t or u or v or w or x or y or z):
    print('a')
else:
    print('A')

Submission status: Runtime Error

Solution code:
a = input()

if a.islower() == True:
  print('a')
else:
  print('A)

Submission status: Runtime Error

Solution code:
S = input()
if S == (a or b or c or d or e or f or g or h or i or j or k or l or m or n or o or p or q or r or s or t or u or v or w or x or y or z):
    print(a)
else:
    print(A)

Submission status: Runtime Error

Solution code:
i = input()

if i = i.upper():
  print("A")
else:
  print("a")

Submission status: Runtime Error

Solution code:
a = input()
if a.isupper() = True:
  print 'A'
else:
  print 'a'

Submission status: Runtime Error

Solution code:
n = int(input())
res = n % 26

A = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
     't','u','v','w','x','y','z']

ans = []
while n//26 > 0 :
  res = n % 26
  if res % 26 != 0:
    ans.append(A[res-1])
  elif res % 26 == 0:
    ans .append(A[25])
  n = n // 26

if res != 0:
  ans.append(A[res-1])
elif res == 0:
  ans.append(A[25])
print(*ans[::-1], sep='')

Submission status: Runtime Error

Solution code:
alpha='A'
if (alpha.islower){
  print(B)
}else{
  print(A)
}

Submission status: Runtime Error

Solution code:
S = input()
if(S.isupper()):
    printf('A')
else:
    printf('a')

Submission status: Runtime Error

Solution code:
α = input()
if α.isupper() = True:
  print 'A'
else:
  print 'a'

Submission status: Runtime Error

Solution code:
a = input()

if a.isupper() == True:
  print('A')

elif a.supper() == False:
  print('a')

Submission status: Runtime Error

Solution code:
#                           जय श्री राम

import sys; import math; from collections import *
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().split())
def get_list(): return list(get_ints())
def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9+7); SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin  = open("input.txt","r"); sys.stdout = open("output.txt","w")

# for _testcases_ in range(int(input())):
start =  26
n = int(input())
ans = []
flag =  False
if n % 26 == 0:
    flag = True
while n:
    ans.append(n%26)
    n //= 26
# print(ans)
ans = ans[::-1]
if flag:
    ans [0] -= 1
    if ans[0] == 0:
        del ans[0]
for i in ans:
    if i == 0:
        i = 26
    printspx(chr(i+ord('a')-1))



'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
mylist = input().split()
mylist.sort()
c = 0
for i in range(b-1):
    c = c + int(mylist[i-1])
print(c)

Submission status: Runtime Error

Solution code:
import sys

input_list = sys.stdin.readlines()

count = 1
get_count = 0
get_value_count = 0
for i in input_list:
  get_values = i.split()
  if count == 1:
    get_value_count = int(get_values[0])
    get_count = int(get_values[1])
  else:
    if get_value_count == 1:
      print(get_values[0])
    else:
      get_values.sort()
      count_value = 1
      p = 0
      for c in get_values:
        if count_value > get_count:
          print(str(p))
        else:
          p = p + int(c)
        count_value = count_value + 1
  count = count + 1

Submission status: Runtime Error

Solution code:
from sys import stdin

str = stdin.readline().rstrip()

if str.islower():
    print('a')
else:
    print('A'from sys import stdin

str = stdin.readline().rstrip()

if str.islower():
    print('a')
else:
    print('A'

Submission status: Runtime Error

Solution code:
a = int(input())
if a.isupper() = True:
  print("A")
else:
  print("a")

Submission status: Runtime Error

Solution code:
α　= input()
if α.isupper():
    print('A')
else:
    print('a')

Submission status: Runtime Error

Solution code:
α　= input('input your favorite alpabet:')
if α.isupper():
    print('A')
elif α.islower:
    print('a')

Submission status: Runtime Error

Solution code:
α = input()
if str.isupper():
  print("A")
else:
  print("a")

Submission status: Runtime Error

Solution code:
giveninput = a 

if giveninput.islower()
	print(giveninput)
  
else:
  	print(giveninput)

Submission status: Runtime Error

Solution code:
a = int(input())
A = int(a. isupper())
if A = "True":
  print("A")
else:
  print("a")

Submission status: Runtime Error

Solution code:
s = input()
print(ord_s.swapcase)

Submission status: Runtime Error

Solution code:
α=int(input())

if α == (a or b or c or d or e or f or g or h or i or j or k or l or m or n or o or p or q or r or s or t or u or v or w or x or y or z):
    print(a)
else:
    print(A)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
p=list(map(int,input().split()))
print(sum(sorted(p)[:k]))

Submission status: Runtime Error

Solution code:
a = int(input())
if a == A or B or C or D or E or F or G or H or I or J or K or L or M or N or O or P or Q or R or S or T or U or V or W or X or Y or Z:
  print("A")
else:
  print("a")