Problem:


Score : 100 points

Problem Statement

Given is a lowercase English letter C that is not z. Print the letter that follows C in alphabetical order.

Constraints

C is a lowercase English letter that is not z.

Input

Input is given from Standard Input in the following format:

C

Output

Print the letter that follows C in alphabetical order.

Sample Input 1

a

Sample Output 1

b

a is followed by b.

Sample Input 2

y

Sample Output 2

z

y is followed by z.



Sample input:
a


Sample output:
b

Submission status: Accepted

Solution code:
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep = ' ', end = '\n'):
    print(*var, file=sys.stderr, end = end, sep = sep)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
# from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

a = input()
print(chr(ord(a[0]) + 1))

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.readline
s = input()

import string
print(chr(ord(s)+1))

Submission status: Accepted

Solution code:
c = input()

ans = ord(c) + 1
ans = chr(ans)
print(ans)

Submission status: Accepted

Solution code:
C = input().strip()
print(chr(ord(C)+1))

Submission status: Accepted

Solution code:
s=input()
k=ord(s)
print(chr(k+1))

Submission status: Accepted

Solution code:
c = input()
a = ord(c)
a+=1
a = chr(a)
print(a)

Submission status: Accepted

Solution code:
s = input()

print(chr(ord(s)+1))

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

C = input()

print(ascii_lowercase[ascii_lowercase.index(C)+1])

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]
    MOD = 10**9 + 7
    YesNo = lambda c : print('Yes') if c else print('No')

    c = input()
    print(chr(ord(c)+1))





if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
C = input()
n = ord(C)+1
print(chr(n))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

c=input()
s=ord(c)
print(chr(s+1))

Submission status: Accepted

Solution code:
C = chr(ord(input())+1)
print(C)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

s = ns()
print(chr(ord(s[0])+1))

Submission status: Accepted

Solution code:
# 2020/01/12

c=input()
print(chr(ord(c)+1))

Submission status: Accepted

Solution code:
from fractions import gcd
# from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

def main():
    c = input()
    print(chr(ord(c)+1))
    
            
                

        




    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# a, b = list(map(int, input().split()))
# 

s = input()
ans = chr(ord(s)+1)
print(ans)

Submission status: Accepted

Solution code:
def main():
    C = input()
    print( chr( ord(C)+1))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
c=input()
t="abcdefghijklmnopqrstuvwxyza"
print(t[t.index(c)+1])

Submission status: Accepted

Solution code:
def main():

    C = input()
    return chr(ord(C)+1)

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(C: str):
    print(chr(ord(C)+1))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    C = next(tokens)  # type: str
    solve(C)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[] for _ in range(num)]
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

C = str(input())

print(chr(ord(C)+1))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(C: str):
    ret = chr(ord(C) + 1)
    print(ret)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    C = next(tokens)  # type: str
    solve(C)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    print(chr(ord(S)+1))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    s = input()
    print(chr(ord(s)+1))
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353


c = sys.stdin.buffer.readline().decode().rstrip()
a =     chr(ord(c) + 1)
print(a)

Submission status: Runtime Error

Solution code:
c = input()
s = list('abcdefghijklmnopqrstuvwxyz')

for i in s:
    if c == s[i]:
        print(s[i+1])
        exit()

Submission status: Runtime Error

Solution code:
c = input()
s = 'abcdefghijklmnopqrstuvwxyz'

for i in s:
    if c == s[i]:
        print(s[i+1])
        exit()

Submission status: Runtime Error

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

# print(M * N)    # 目標合計点
# print(sum(A))   # 現状合計点
# print(M * N - sum(A))  # 目標達成に必要な点数

if (M * N - sum(A)) < 0:
    print('0')
elif 0 <= (M * N - sum(A)) <= 100:
    print(M * N - sum(A))
else:
    print('-1')

Submission status: Runtime Error

Solution code:
alphabet = [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]
C=input()
idx=alphabet.index(C)
print(alphabet[idx+1])

Submission status: Runtime Error

Solution code:
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"]

C = input()

B = A.index(C)

print(A[B+1])

Submission status: Runtime Error

Solution code:
C = input()
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"]

b = c.index(C)
print(a[b+1])

Submission status: Runtime Error

Solution code:
from collections import deque
from typing import List


def main():
    h, w = map(int, input().split())
    g = [input() for _ in range(h)]
    print(mm(h, w, g))


def mm(h: int, w: int, g: List[List[str]]) -> int:
    ret = 0
    for i in range(h):
        for j in range(w):
            if (g[i][j] == '#'):
                continue
            cnt = 0
            q = deque([(i, j, cnt)])
            v = set()
            while q:
                ii, jj, cnt = q.popleft()
                v.add((ii, jj))
                ret = max(ret, cnt)
                # ↓
                if ii < h - 1 and g[ii + 1][jj] == '.' and (ii + 1, jj) not in v:
                    q.append((ii + 1, jj, cnt + 1))
                # →
                if jj < w - 1 and g[ii][jj + 1] == '.' and (ii, jj + 1) not in v:
                    q.append((ii, jj + 1, cnt + 1))
                # ↑
                if ii > 0 and g[ii - 1][jj] == '.' and (ii - 1, jj) not in v:
                    q.append((ii - 1, jj, cnt + 1))
                # ←
                if jj > 0 and g[ii][jj - 1] == '.' and (ii, jj - 1) not in v:
                    q.append((ii, jj - 1, cnt + 1))
    return ret


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
c = input()
al = "abcdefghijklmnopqrstuvwxz"
print(al[al.index(c)+1])

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
A = [input().split for i in range(M)]
cac = 0
cwa = 0

for i in range(1, N + 1):
    for a in A:
        while a[0] == str(i):
            if a[1] == 'WA':
                cwa += 1
            else:
                cac += 1
                break
        while a[0] == str(i):
            A.remove(a)
print(cac, cwa)

Submission status: Runtime Error

Solution code:
print(chr(ord((input())+1))

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
num_AC,num_WA = 0,0
res = [list(input().split()) for i in range(M)]
check = ['v']*N
WA_check = [0]*N
for i,j in res:
  i = int(i)
  if check[i-1] == 'v':
    if j == 'WA':
      WA_check[i-1] += 1
    if j == 'AC':
      num_AC += 1
      num_WA += WA_check[i-1]
      check[i-1] = '.'
print(num_AC,num_WA)

Submission status: Runtime Error

Solution code:
a=input()
print(a+1)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
l=[0]*n
d=[0]*n
for i in range(m):
    s=input().split()
    x=int(s[0])
    if(s[1]=='AC'):
        l[x-1]=1
    else:
        if(l[x-1]==1):
            continue
        else:
            d[x-1]+=1
p=0
for i in range(n):
    if(l[i]==1):
        p+=d[i]
print(sum(l),p)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>

using namespace std;
using ll = long long;

int main() {
    char c;
    cin >> c;
    printf("%c", c + 1);
}

Submission status: Runtime Error

Solution code:
import numpy as np
N, K, M = map(int,input().split())
A = list(map(int,input().split()))
A = np.array(A)
if M*N-np.mean(A)*(N-1) < 0:
    print(0)
elif M*N-np.mean(A)*(N-1)<K:
    print(Decimal(str(M*N-np.mean(A)*(N-1))).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
else:
    print(-1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
letter = ord(input())
print(chr(c+1))

Submission status: Runtime Error

Solution code:
print(chr(ord(int(input())) + 1))

Submission status: Runtime Error

Solution code:
s = input()
list_S = ["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 i in list_s:
  if list_s[i] == s:
    print(list_s[i+1])

Submission status: Runtime Error

Solution code:
s=input()
print (chr(ord(s) + 1)

Submission status: Runtime Error

Solution code:
n, k, m = map(int, input().split())
A = list(map(int, input().split()))
test_sum = 0

for i in range(n-1):
    test_sum = test_sum + A[i]
    
test_n = (m * n) - test_sum
if test_n >= k:
    print("-1")
else:
    print(str(test_n))

Submission status: Runtime Error

Solution code:
C = input()
chars = "abcdefghijklmnopqrstuvwxyz"
ls = list(chars) + list(chars)
dic = {chars[i]:chars[i+1] for i in range(26)}
print(dic[C])

Submission status: Runtime Error

Solution code:
from collections import deque
import sys
from copy import deepcopy
input = sys.stdin.readline


def bfs(table, i, j):
    dq = deque()
    if table[i][j] == "#":
        return -1
    h = len(table)
    w = len(table[0])
    ans = 0
    dq.append((i, j, 0))  # x,y,distance
    while dq:
        x, y, dis = dq.popleft()
        ans = max(ans, dis)
        if x > 0 and (x - 1, y) and table[x - 1][y] != "#":
            dq.append((x - 1, y, dis + 1))
            table[x - 1][y] = "#"
        if x < h - 1 and (x + 1, y) and table[x + 1][y] != "#":
            dq.append((x + 1, y, dis + 1))
            table[x + 1][y] = "#"
        if y > 0 and (x, y - 1) and table[x][y - 1] != "#":
            dq.append((x, y - 1, dis + 1))
            table[x][y - 1] = "#"
        if y < w - 1 and (x, y + 1) and table[x][y + 1] != "#":
            dq.append((x, y + 1, dis + 1))
            table[x][y + 1] = "#"
    return ans


def main():
    h, w = [int(i) for i in input().strip().split()]
    grid = [list(input().strip()) for _ in range(h)]
    ans = 0
    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                _grid = deepcopy(grid)
                max_path = bfs(_grid, i, j)
                ans = max(ans, max_path)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
from _collections import deque

h, w = map(int, input().split())
ls = []
for _ in range(h):
    ls1 = []
    s = input()
    for i in range(w):
        if s[i] == '.':
            ls1.append(0)
        else:
            ls1.append(1)
    ls.append(ls1)

def trans(a, b):
    return a * w + b

ls2 = [[] for _ in range(h * w)]

for i in range(h):
    for j in range(w):
        # check ij
        if ls[i][j] == 1:
            continue
        if 0 <= i < h and 0 <= j - 1 < w and ls[i][j - 1] == 0:
            ls2[trans(i, j)].append(trans(i, j - 1))
            #print(ls2)
        if 0 <= i + 1 < h and 0 <= j < w and ls[i + 1][j] == 0:
            ls2[trans(i, j)].append(trans(i + 1, j))
            #print(ls2)
        if 0 <= i - 1 < h and 0 <= j < w and ls[i - 1][j] == 0:
            ls2[trans(i, j)].append(trans(i - 1, j))
            #print(ls2)
        if 0 <= i < h and 0 <= j + 1 < w and ls[i][j + 1] == 0:
            ls2[trans(i, j)].append(trans(i, j + 1))

def route(i, j):
    if i == j:
        return 0
    count = 1
    ss = deque(ls2[i])
    next = deque()
    now = i
    explored = set([i])
    while True:
        #print(now, i, j)
        if not ss:
            count +=1
            ss = next
            next = deque()
        now =ss.popleft()
        if now in explored:
            continue
        if now == j:
            #print(count)
            return count
        else:
            explored.add(now)
            next.extend(ls2[now])

ls3 = [0] * (h * w)

for i in range(h * w):
    if ls2[i] == []:
        continue
    count = 0
    for j in range(h * w):
        if ls2[j] == []:
            continue
        else:
            count = max( count, route(i, j))
    ls3[i] = count

print(max(ls3))

Submission status: Runtime Error

Solution code:
c = input()

l = [chi(i) for i in range(65, 91)]
print(l[l.index(c) + 1])

Submission status: Runtime Error

Solution code:
C = input()

ary = "abcdefghijklmnopqrstuvwxyz".split("")

print(ary[ary.index(C) + 1])

Submission status: Runtime Error

Solution code:
print(char(ord(input())+1))

Submission status: Runtime Error

Solution code:
print(input()+1)

Submission status: Runtime Error

Solution code:
I="abcdefghijklmnopqrstuvwxyz"
for i in range(25):
    if I[i]==input():
        print(I[i+1])

Submission status: Runtime Error

Solution code:
from strings import ascii_lowercase as lc
given = input()
print(lc[lc.index(given) + 1])

Submission status: Runtime Error

Solution code:
c=input()
print(c+1)

Submission status: Runtime Error

Solution code:
import numpy as np
from collections import deque

h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
#s = np.array(s)
#s = (s == ".") * 1
def neext(a):
    l, m = a[0], a[1]
    return [(l, m+1), (l, m-1), (l+1, m), (l-1, m)]
def solve(i, j):
    if s[i][j] == '#':
        return 0
    else:
        pre = 0
        p = np.full((h, w), -1)
        check = deque([((i, j), 0)])#(from,now, dist)
        while check:
            now, d = check.popleft()
            p[now[0]][now[1]] = d
            pre = max(pre, d)
            for b, c in neext((now[0], now[1])):
                if b < 0 or c < 0 or b >= h or c >= w:
                    continue 
                if p[b][c] != -1 or s[b][c] == '#':
                    continue
                else:
                    check.append(((b, c), d + 1))
        return pre
ans = 0
for H in range(len(s)):
    for W in range(len(s[0])):
        ans = max(ans, solve(H, W))
print(ans)

Submission status: Runtime Error

Solution code:
from collections import deque

H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]

dir = [(-1, 0), (1, 0), (0, -1), (0, 1)]

dist = [[-1] * W for _ in range(H)]

def BFS(y, x):
  """(y, x)からはじめて、道のマスをBFSで最短距離を探す"""
  que = deque()
  que.append((y, x))
  dist[y][x] = 0
  max_dist = 0
  while que:
    sy, sx = que.popleft()  # popleft?
    for dy, dx in dir:
      ny = sy + dy
      nx = sx + dx
      if 0 <= ny < H and 0 <= nx < W and S[ny][nx] != "#" and dist[ny][nx] == -1:
        que.append((ny, nx))
        dist[ny][nx] = dist[sy][sx] + 1
        max_dist = max(max_dist, dist[ny][nx])
  
  return max_dist

max_dist = 0
for sy in range(H):
  for sx in range(W):
    if S[sy][sx] != "#":
      dist = [[-1] * W for _ in range(H)]
      max_dist = max(max_dist, BFS(sy, sx))
      
print(max_dist)

Submission status: Runtime Error

Solution code:
# !/usr/bin/python3

"""
https://atcoder.jp/contests/abc151/tasks/abc151_c
Welcome at atcoder
"""


if __name__ == "__main__":
    n, m = list(map(int, input().split()))

    accepted = [False for _ in range(n+5)]
    wrong = [0 for _ in range(n+5)]
    ac = wa = 0

    for _ in range(m):
        p, s = input().split()
        p = int(p)

        if accepted[p]: continue
        elif s == "WA": wrong[p] += 1
        elif s == "AC":
            ac += 1
            wa += wrong[p]
            accepted[p] = True

    print(ac, wa)

Submission status: Runtime Error

Solution code:
C = input()

print(char(ord(C)+1))

Submission status: Runtime Error

Solution code:
import collections

n, m = map(int, input().split())
list_ac = set()
dic = collections.defaultdict(lambda:0)

ac = 0
wa = 0

for _ in range(m):
    p, s = input().split()
    if s == "WA" and p not in list_ac:
        dic[p] += 1
    elif s =="AC" and p not in list_ac:
        list_ac.add(p)
        ac += 1
        if p in dic:
            wa += dic[p]
            
print(ac, wa)

Submission status: Runtime Error

Solution code:
c=input()
alp="abcdefghijklmnopqrstuvwxyz"
for i in range(25):
  if c==alp[i]:
    print(alh[i+1])
    break

Submission status: Runtime Error

Solution code:
alpha="abcdefghijklmnomqrstuvwxyz"
inp=input()
def split(w):
    return [all for all in w]
alpha=split(alpha)
x=alpha.index(inp)
try:
    print(alpha[x+1])
except:
    print("a")

Submission status: Runtime Error

Solution code:
alpha="abcdefghijklmnomqrstuvwxyz"
inp=input()
def split(w):
    return [all for all in w]
alpha=split(alpha)
x=alpha.index(inp)
print(alpha[x+1])

Submission status: Runtime Error

Solution code:
N,K,M = map(int,input().split())
a = list(map(int,input().split()))
now = sum(a)
goal = N*M
if now + K >= goal:
  if now >= goal:
    print(0)
  else:
    print(goal-now)
else:
  print(-1)

Submission status: Runtime Error

Solution code:
#

import sys
input=sys.stdin.readline
MOD=10**9+7

fact=[1]*(10**5+1)
for i in range(1,10**5+1):
    fact[i]=(fact[i-1]*i)%MOD
    
def comb(n,r):
    nhri=pow(fact[n-r],MOD-2,MOD)
    ri=pow(fact[r],MOD-2,MOD)
    return fact[n]//(nhri*ri)


def main():
    N,K=map(int,input().split())
    A=list(map(int,input().split()))
    
    A.sort()
    maxsum=0
    for i in range(K-1,N):
        maxsum+=comb(i,K-1)*A[i]
        maxsum%=MOD
    
    A.sort(reverse=True)
    minsum=0
    for i in range(K-1,N):
        minsum+=comb(i,K-1)*A[i]
        minsum%=MOD
        
    print((maxsum-minsum)%MOD)
    
    
if __name__=="__main__":
    main()

Submission status: Runtime Error

Solution code:
s = input()
st = 'abcdefghijklmnopqrstuvwxyz'
print(st[index(s)+1])

Submission status: Runtime Error

Solution code:
c = int(input())
C = ord(c)
print(chr(C))

Submission status: Runtime Error

Solution code:
ch = ord(raw_input())
print(chr(ord(ch) + 1))

Submission status: Runtime Error

Solution code:
print(chr(ord(input()+1)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
a=list(map(int,input().split()))
mod=10**9+7
a.sort()
def fact(n):
  if n==0:
    return 1
  else:
    s=1
    for i in range(1,n+1):
      s=s*i
    return s
def comb(n,k,mod):
  return (fact(n)//fact(k)//fact(n-k))%mod

if k>1:
  s=0
  for i in range(0,n-k):
    for j in range(i+k-1,n-1):
      s+=((a[j]-a[i])*comb(j-i-1,k-2,mod))%mod
  print(s%mod)
else:
  print(0)

Submission status: Runtime Error

Solution code:
c=input()
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]
print(l[l.index(c)+1])

Submission status: Runtime Error

Solution code:
N=input()
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]
print(L[L.index(N)+1])

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())

p = [0]*(M+1)
s = [0]*(M+1)

for i in range(1,M+1):
  p[i],s[i] = input().split()
p = list(map(lambda pi:int(pi),p))


wa = 0
ac = 0
m=0
for i in range(1,N+1):
  if not i in p:
    continue
  m += 1
  if p[m]==i:
    if s[m]=='AC':
      ac += 1
      break
    elif s[m] == 'WA':
      wa += 1
  if m == N:
	break    
if N==wa:
  wa = 0
print(str(ac)+' '+str(wa))

Submission status: Runtime Error

Solution code:
H,W = map(int,input().split())
maze = []
from collections import deque
for _ in range(H):
    s = list(input())
    maze.append(s)
direction = [[1,0],[0,1],[-1,0],[0,-1]]
ans = -1
for row in range(H):
    for col in range(W):
        if maze[row][col] == "#":
            continue
        distance = [[-1 for _ in range(W)] for _ in range(H)]
        d = deque([[row,col]])
        distance[row][col] = 0
        while(len(d)>0):
            nowrow, nowcol = d.popleft()
            for subrow, subcol in direction:
                subrow += nowrow
                subcol += nowcol
                if subrow < 0 or subrow >= H or subcol < 0 or subcol >= W:
                    continue
                if maze[subrow][subcol] == "#":
                    continue
                if distance[subrow][subcol] != -1:
                    continue
                d.append([subrow, subcol])
                distance[subrow][subcol] = distance[nowrow][nowcol] + 1
            ans = max(ans,max([max(maxrow) for maxrow in distance]))
print(ans)

Submission status: Runtime Error

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

L = N * M
S = sum(A)

if L - S > K or S >= L:
    print(-1)
else:
    print(L - S)

Submission status: Runtime Error

Solution code:
al = "abcdefghijklmnopqrstuvwxyz"
C = input()
print(al[al.index(C)+1])
al = abcdefghijklmnopqrstuvwxyz
C = input()
print(al[al.index(C)+1])

Submission status: Runtime Error

Solution code:
al = abcdefghijklmnopqrstuvwxyz
C = input()
print(al[al.index(C)+1])

Submission status: Runtime Error

Solution code:
V=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','y','z']
ch = input()
for i in range(26):
  if(ch==V[i]):
    print(V[i+1])

Submission status: Runtime Error

Solution code:
a = "abcdefghijklmnopqrstuvwyz"

s = input()
print(a.index[a.index(s)+1])

Submission status: Runtime Error

Solution code:
c = input()
c = ord(c + 1)
print(c)

Submission status: Runtime Error

Solution code:
c = input()
c = c + 1
print(c)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
  char c;
  cin >> c;
  cout << char(c+1) << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
print(chr(ord(input()))+1)

Submission status: Runtime Error

Solution code:
a = input()
print(char(ord(a)+1))

Submission status: Runtime Error

Solution code:
C = input()
print chr(ord('C') + 1)

Submission status: Runtime Error

Solution code:
c=input().split(" ")
r = ["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"]
print(r[r.index(c)+1])

Submission status: Runtime Error

Solution code:
l="abcdefghijklmnopqrstuvwxy"
print(l[l.index(input())+1])

Submission status: Runtime Error

Solution code:
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"]
print(L[L.index(input())+1])

Submission status: Runtime Error

Solution code:
# C - Welcome to AtCoder
# https://atcoder.jp/contests/abc151/tasks/abc151_c

n,m = map(int,input().split())
submits = [list(input().split()) for i in range(0,m)]

ac = 0
wa = 0

AC = "AC"
WA = "WA"

tmp_wa = 0
tmp_ac = 0


for i in range(len(submits)):
    # ACなら正解数をカウントアップ
    if submits[i][1] == AC:
        # 同じ問題に正解してないかチェック
        if submits[i][0] == tmp_ac:
            tmp_ac = submits[i][0]
            continue
        ac += 1
        # WAの数をカウント
        wa += tmp_wa
        # WAを初期化
        tmp_wa = 0
        tmp_ac = submits[i][0]
    else:
        # WAならwa+1
        tmp_wa += 1

print(str(ac) + " " + str(wa))

Submission status: Runtime Error

Solution code:
# C - Welcome to AtCoder
# https://atcoder.jp/contests/abc151/tasks/abc151_c

n,m = map(int,input().split())
submits = [list(input().split()) for i in range(0,m)]

ac = 0
wa = 0

AC = "AC"
WA = "WA"

tmp_wa = 0
tmp_ac = 0


for i in range(len(submits)):
    # ACなら正解数をカウントアップ
    if submits[i][1] == AC:
        # 同じ問題に正解してないかチェック
        if submits[i][0] == tmp_ac:
            continue
        ac += 1
        # WAの数をカウント
        wa += tmp_wa
        # WAを初期化
        tmp_wa = 0
        tmp_ac = submits[i][0]
    else:
        # WAならwa+1
        tmp_ac = submits[i][0]
        tmp_wa += 1

print(str(ac) + " " + str(wa))

Submission status: Runtime Error

Solution code:


c = raw_input()



ls = [chr(ord('a') + i) for i in range(26)]

for i in range(len(ls)):
    if ls[i] == c:
        print(ls[i + 1])
        break

Submission status: Runtime Error

Solution code:
import string

c = raw_input()



ls = string.ascii_lowercase

for i in range(len(ls)):
    if ls[i] == c:
        print(ls[i + 1])
        break

Submission status: Runtime Error

Solution code:
c = input()

print(chr(c + 1))

Submission status: Runtime Error

Solution code:
h,w=map(int,input().split())
n=h*w
inf=10**6
field=[]
for i in range(h):
    field.append(input())
dist=[[inf]*n for i in range(n)]
for i in range(h):
    for j in range(w):
        if field[i][j]=="#":continue
        if j+1<w and field[i][j+1]!="#":
            dist[i*w+j][i*w+j+1]=1
            dist[i*w+j+1][i*w+j]=1
        if i+1<h and field[i+1][j]!="#":
            dist[i*w+j][(i+1)*w+j]=1
            dist[(i+1)*w+j][i*w+j]=1
for i in range(n):
    for j in range(n):
        for k in range(n):
            dist[j][k]=min(dist[j][k],dist[j][i]+dist[i][k])
ans=0
for i in range(n):
    for j in range(n):
        if i==j:
            continue
        if dist[i][j]==inf:
            continue
        ans=max(ans,dist[i][j])
print(ans)