Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
word_S = input().split(" ")[-1]
S = list(word_S)
change_K = int(input())
word1 = ""
for i in range(change_K - 1):
    word1 = word1 + S[i]
word2 = S[change_K - 1]
word3 = ""
count = 0
while True:
    try:
        word3 = word3 + S[change_K + count]
        count += 1
    except IndexError:
        break
word2 = word2.swapcase()
print(word1+word2+word3)


Fixed submission:
change_K = int(input().split(" ")[-1])
word_S = list(input())
S = list(word_S)
word1 = ""
for i in range(change_K - 1):
    word1 = word1 + S[i]
word2 = S[change_K - 1]
word3 = ""
count = 0
while True:
    try:
        word3 = word3 + S[change_K + count]
        count += 1
    except IndexError:
        break
word2 = word2.swapcase()
print(word1 + word2 + word3)
Buggy python submission (verdict: Runtime Error):
x = list(input())
first = 10 * int(x[0]) + int(x[1])
second = 10 * int(x[2]) + int(x[3])


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 1 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        pirnt("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")


Fixed submission:
x = list(input())
first = 10 * int(x[0]) + int(x[1])
second = 10 * int(x[2]) + int(x[3])


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 0 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        print("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")

Buggy python submission (verdict: Runtime Error):
x = list(input())
first = 10 * x[0] + x[1]
second = 10 * x[2] + x[3]


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 1 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        pirnt("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")

Fixed submission:
x = list(input())
first = 10 * int(x[0]) + int(x[1])
second = 10 * int(x[2]) + int(x[3])


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 0 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        print("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")
Buggy python submission (verdict: Runtime Error):
L,R= map(int, input().split())
d = input()
 
for L in range(R):
  if(i%d == 0) cnt++
  
print(cnt)

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)

Buggy python submission (verdict: Runtime Error):
L,R,d = (int(_) for _ in input().split())
 
for i in range(d):
  if(i%d == 0) cnt++
  
print(cnt)

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)

Buggy python submission (verdict: Runtime Error):
L,R,d = map(int(_) for _ in input().split())

for i in range(0, d):
  if(i%d == 0) cnt++
  
print(cnt)

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)

Buggy python submission (verdict: Runtime Error):
L,R,d = input(int(_) for _ in input().split())

for i in range(d):
  if(i%d == 0) cnt++
  
print(cnt)

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)

Buggy python submission (verdict: Runtime Error):
L,R,d = input(int(_) for _ in input().split())

for i in range(0, d):
  if(i%d == 0) cnt++
  
print(cnt)

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)

Buggy python submission (verdict: Runtime Error):
L,R,d = input(int(_) for _ in input().split())

for i in range(d):
  if(i%d == 0) cnt++;
  
print(cnt);

Fixed submission:
L,R,d=map(int, input().split())
cnt=0
 
for i in range(L, R+1):
  if i%d == 0: cnt+=1
  
print(cnt)
Buggy python submission (verdict: Runtime Error):
user = int(input())
new = str(user)
ifunction new():
    user = int(input())
    new = str(user)
        if (new == 2 or 4 or 5 or 7 or 9):
            return("hon")
        elif (new ==  0 or 1 or 6 or 8):
            return("pon")
        elif(new == 3):
            return("bon")
print()

Fixed submission:
hon = '24579'
pon = '0168'
bon = '3'
N = str(input())
if N[-1] in hon:
  print("hon")
elif N[-1] in pon:
  print("pon")
elif N[-1] in bon:
  print("bon")
Buggy python submission (verdict: Runtime Error):
S = int(input())
W = int(input())
print('unsafe') if W>= S else print('safe')

Fixed submission:
S, W = map(int, input().split())
print('unsafe') if W>= S else print('safe')
Buggy python submission (verdict: Runtime Error):
N = int(input())
Ai = list(map(int, input().split()))
for i in Ai:
    print(Ai.count(i))



Fixed submission:
import math
user = int(input())
print((math.pi)*2*user)
Buggy python submission (verdict: Runtime Error):
M, N = map(int ,input().split())
x = [int(x) for x in input().split()]
if 1 <= (N) < 10**6 and 1 <= (M) < 10**4 and 1 <= x[1] < 10**4 :
    if (sum(x)) > M:
        print(-1)
    elif(sum(x) == M):
        print(0)
    elif(sum(x)<M):
        print(M-sum(x))

Fixed submission:
M, N = map(int ,input().split())
x = [int(x) for x in input().split()]
if (sum(x)) > M:
    print(-1)
elif(sum(x) == M):
    print(0)
elif(sum(x)<M):
    print(M-sum(x))

Buggy python submission (verdict: Runtime Error):
M, N = map(int ,input().split())
x = [int(x) for x in input().split()]
if 1 <= (N) < 10**6 and 1 <= (M) < 10**4 and 1 <= x[1] < 10**4 :
    if (sum(x)) > M:
        print(-1)
    elif(sum(x) == M):
        print(0)
    elif(sum(x)<M):
        print(M-sum(x))

Fixed submission:
M, N = map(int ,input().split())
x = [int(x) for x in input().split()]
if (sum(x)) > M:
    print(-1)
elif(sum(x) == M):
    print(0)
elif(sum(x)<M):
    print(M-sum(x))

Buggy python submission (verdict: Runtime Error):
M, N= input().split()
A1, Am = input().split()
if 1 <= int(N) < 10**6 and 1 <= int(M) < 10**4 and 1 <= int(A1) < 10**4 :
    if((int(A1) + int(Am)) <= int(M)):
        print((int(A1)+int(Am))-int(M))
    elif (int(A1) + int(Am)) == int(M):
        print(0)
    elif (int(A1)+int(Am)) > int(M):
        print(-1)

Fixed submission:
M, N = map(int ,input().split())
x = [int(x) for x in input().split()]
if (sum(x)) > M:
    print(-1)
elif(sum(x) == M):
    print(0)
elif(sum(x)<M):
    print(M-sum(x))
Buggy python submission (verdict: Runtime Error):
items,select = input().split()
x = [int(items) for x in input().split()]
for u in x:
    if u > (1 / (4 * int(select))*sum(x)):
        print("No")
        break
    else:
        print("Yes")
        break


Fixed submission:
A,B,C= map(int,input().split())
print(C,A,B)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
print(c,a,b)

Fixed submission:
A,B,C= map(int,input().split())
print(C,A,B)

Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())
z = int(input())
print(str(z)+' '+str(x)+' '+str(y))

Fixed submission:
A,B,C= map(int,input().split())
print(C,A,B)

Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())
z = int(input())
result = [z,x,y]
print(*result, sep=" ")

Fixed submission:
A,B,C= map(int,input().split())
print(C,A,B)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))


B = sorted(A)
#print(A)
C = []
last = -1
for i in range(N):
    if(last != B[i]):
        C.append(B[i])
        last = B[i]
    else:
        if(len(C)>0):
            del C[-1]



l = []
for e in C:
    status = True
    for p in l:
        if(e % p == 0):
            status = False
    if(status):
        l.append(e)
print(len(l))

Fixed submission:
## coding: UTF-8
N = int(input())
A = sorted(list(map(int,input().split())))


#print(A)

MAX = 10**6+1000
l = [True] * MAX


count = 0
last = -1
mode = 0
for i in range(len(A)):
    e = A[i]
    if(last == e):
        count -= 1
        last = -1
    if(l[e]):
        count += 1
        for j in range(MAX):
            try:
                l[j*e] = False
            except IndexError:
                break
        last = e

    #print(l)

print(count)
Buggy python submission (verdict: Runtime Error):
## coding: UTF-8

#ダブリングを利用した実装

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

#2**59 < 10**18< 2**60より2**60まで格納する
l = [0] * (N*61)

for j in range(N):
    l[j] = A[j]


for i in range(1,61):
#for i in range(1, 4):
    for j in range(N):
        p = l[(i-1)*N+j] #一段上を参照(2**(i-1)回移動した時の移動先)
        q = l[(i-1)*N+(p-1)] #pから2**(i-1)回移動した時の移動先を参照　＝　2**i 回移動した時の移動先
        l[i*N+(j)] = q
    #print(l)
#print(l)

bin_str = format(K, 'b')
#print(bin_str)
s = bin_str[::-1]
#print(s)
now = 1 #start地点
for i in range(len(s)):
    if(s[i] == '1'):
        now = l[(i)*N + (now-1)]
        #print(now)

        '''
        next_index = i*N + l[i*N + (now-1)]-1
        nex = l[next_index]
        now = nex
        print(now)
        '''
print(now)

Fixed submission:
## coding: UTF-8
#N, M, K = 9, 3, 4
N, M, K = map(int,input().split())
p = 998244353


# 返り値: a と b の最大公約数
# 返り値: ax + by = gcd(a, b) を満たす (x, y) が格納される
def aug_gcd(a, b):
    lq = []
    while b > 0:
        q = int(a/b)
        r = a % b
        a = b
        b = r
        lq.append(q)
    x = 1
    y = 0
    for i in range(len(lq)):
        tmp = x
        x = y
        y = tmp - lq[(-1)*(i+1)] * y
    return a, x, y

#拡張ユークリッドの互除法による逆元計算
#拡張ユークリッドの方が二分累乗法より高速/mが素数でなくとも良い
def modinv(a, p):
    inv = aug_gcd(a, p)[1] #ax == 1(mod p) <==> ax + py == 0, xの値が逆元
    if(inv < 0):
        inv += p #pがマイナスだったらプラスに書き換える
    return inv


#[NC0, NC1, NC2, NC3, ..., NCN % p]
def N_Combination_k(N, p):
    #NCkのリストを作ります
    l = [1]
    res = 1
    for i in range(1, N+1):
        res *= (N+1-i)
        res %= p
        res *= modinv(i, p)
        res %= p
        l.append(res)
    return l


combination_N_1 = N_Combination_k(N-1, p)
#print(combination_N_1)
Cumulative = [0] #累積和
s = 0
tod = 1 #(M-1) ** (N-1-i)
for i in range(N):
    s += M * tod * combination_N_1[(-1)*(i+1)]
    s %= p
    tod *= (M-1)
    tod %= p
    Cumulative.append(s)
    #print(s)
#print(Cumulative)

ans = Cumulative[-1] - Cumulative[(-1)*(K+2)]
if(ans < 0):
    ans += p
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product
import math
from math import gcd

N = int(input())
S = input()

r_list = []
g_list = []
b_list = []

for i in range(N):
    if(S[i] == 'R'):
        r_list.append(i)
    elif(S[i] == 'G'):
        g_list.append(i)
    else:
        b_list.append(i)

#print('r:{}, g:{}, b:{}'.format(r_list, g_list, b_list))

R_count = len(r_list)
G_count = len(g_list)
B_count = len(b_list)
#print(R_count * G_count * B_count)

counter = R_count * G_count * B_count
NG_list = []
for i in range(R_count):
    for j in range(G_count):
        r = r_list[i]
        g = g_list[j]
        hit_count = 0
        if( (g+g-r) in b_list):
            hit_count += 1
        if( (g+r)%2 == 0 and ((g+r)/2) in b_list ):
            hit_count+=1
        if( (r-g+r) in b_list):
            hit_count+=1
        counter -= hit_count
print(counter)
   


Fixed submission:
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product
import math
from math import gcd

N = int(input())
S = input()

r_list = []
g_list = []
b_list = []

for i in range(N):
    if(S[i] == 'R'):
        r_list.append(i)
    elif(S[i] == 'G'):
        g_list.append(i)
    else:
        b_list.append(i)

#print('r:{}, g:{}, b:{}'.format(r_list, g_list, b_list))

R_count = len(r_list)
G_count = len(g_list)
B_count = len(b_list)
#print(R_count * G_count * B_count)

b_num_list = [0 for i in range(N)]
for i in range(B_count):
    b_num_list[b_list[i]] += 1
#print('b_num_list:{}'.format(b_num_list))
    

counter = R_count * G_count * B_count
NG_list = []
for i in range(R_count):
    for j in range(G_count):
        r = r_list[i]
        g = g_list[j]
        hit_count = 0
        #if( (g+g-r) in b_list):
        #print('g+g+r:{}'.format(g+g-r))
        if(g+g-r >= 0 and g+g-r <= N-1): #and b_num_list[g+g-r] == 1)
            #print('b_num_list[g+g-r]:{}'.format(b_num_list[g+g-r]))
            if(b_num_list[g+g-r] == 1):
                hit_count += 1
        #if( (g+r)%2 == 0 and ((g+r)/2) in b_list ):
        if( (g+r)%2 == 0 and b_num_list[int((g+r)/2)] == 1):
            hit_count+=1
        #if( (r-g+r) in b_list):
        if(r+r-g >= 0 and r+r-g <= N-1 ):#and b_num_list[r+r-g] == 1):
            if(b_num_list[r+r-g] == 1):
                hit_count+=1
        counter -= hit_count
print(counter)
Buggy python submission (verdict: Runtime Error):
## coding: UTF-8
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

s = input().split()
t = [int(p) for p in s]

sA = input().split()
p = [int(w) for w in sA]
p.sort(reverse=True) #大きい順に並べ替える


sB = input().split()
q = [int(p) for p in sB]
q.sort(reverse=True)

sC = input().split()
r = [int(p) for p in sC]
r.sort(reverse=True)

X = t[0]
Y = t[1]
A = t[2]
B = t[3]
C = t[4]
p = p[:X] #下の方はいらない子
q = q[:Y] #下の方はいらない子
r = r[:X+Y] #下の方はいらない子だけど、全部無色の可能性もある。
#print('{} {} {} {} {}'.format(X,Y,A,B,C))
#print(p)
#print(q)
#print(r)

def delete_min(p, q, r):
    if(p[-1] <= q[-1] and p[-1] <= r[-1]):
        del p[-1]
    elif(q[-1] <= r[-1]):
        del q[-1]
    else:
        del r[-1]

while len(p) + len(q) + len(r) > X + Y:
    delete_min(p, q, r)
    #print('p:{}, q:{}, r:{}'.format(p,q,r))

answer = sum(p) + sum(q) + sum(r)
print(answer)




Fixed submission:
## coding: UTF-8
#最後の方のテストケースでREになってしまう。時間切れ。
from decimal import *
from itertools import permutations, combinations,combinations_with_replacement,product

s = input().split()
t = [int(p) for p in s]


sA = input().split()
p = [int(w) for w in sA]
p.sort(reverse=True) #大きい順に並べ替える


sB = input().split()
q = [int(p) for p in sB]
q.sort(reverse=True)

sC = input().split()
r = [int(p) for p in sC]
r.sort(reverse=True)

X = t[0]
Y = t[1]
A = t[2]
B = t[3]
C = t[4]
p = p[:X] #下の方はいらない子
q = q[:Y] #下の方はいらない子
r = r[:X+Y] #下の方はいらない子だけど、全部無色の可能性もある。
#print('{} {} {} {} {}'.format(X,Y,A,B,C))
#print(p)
#print(q)
#print(r)

def delete_min(p, q, r):
    if(len(p) == 0 and len(q) == 0):
        del r[-1]
    elif(len(p) == 0):
        if(q[-1] <= r[-1]):
            del q[-1]
        else:
            del r[-1]
    elif(len(q) == 0):
        if(p[-1] <= r[-1]):
            del p[-1]
        else:
            del r[-1]
    elif(len(r) == 0):
        if(p[-1] <= q[-1]):
            del p[-1]
        else:
            del q[-1]
    else:
        if(p[-1] <= q[-1] and p[-1] <= r[-1]):
            del p[-1]
        elif(q[-1] <= r[-1]):
            del q[-1]
        else:
            del r[-1]
    #要素数が0になることもありうるので、その回避処理が必要だった

while len(p) + len(q) + len(r) > X + Y:
    delete_min(p, q, r)
    #print('p:{}, q:{}, r:{}'.format(p,q,r))

answer = sum(p) + sum(q) + sum(r)
print(answer)
Buggy python submission (verdict: Runtime Error):
## coding: UTF-8
#from decimal import *
s = input().split()
t = [int(p) for p in s]


#print(t)
if( Decimal(Decimal(t[0]) % 2 )== 1 and Decimal(Decimal(t[1]) % 2) == 1):
    n = Decimal( Decimal(Decimal(t[0]) - 1) // 2  )
    #print(n)
    m = Decimal( Decimal(Decimal(t[1]) - 1) // 2  )
    answer = Decimal(    Decimal(  Decimal(Decimal(m) + 1)     *    Decimal(Decimal(n) + 1)  )   + Decimal( Decimal(m) * Decimal(n) )       )
else:
    answer = Decimal(   Decimal(Decimal(t[0]) * Decimal(t[1])) // 2  )

print(int(answer))

'''
H = t[0]
W = t[1]
ans = 0
if( W % 2 == 0):
    for i in range(H):
        ans += W / 2
else:
    for i in range(H):
        if(i % 2 == 0):
            ans += W / 2.0 + 0.5
        else:
            ans += W / 2.0 - 0.5
print(int(ans))
'''


Fixed submission:
## coding: UTF-8
from decimal import *
s = input().split()
t = [int(p) for p in s]


#print(t)
if(t[0] == 1 or t[1] == 1):
    answer = 1
elif( Decimal(Decimal(t[0]) % 2 )== 1 and Decimal(Decimal(t[1]) % 2) == 1):
    n = Decimal( Decimal(Decimal(t[0]) - 1) // 2  )
    #print(n)
    m = Decimal( Decimal(Decimal(t[1]) - 1) // 2  )
    answer = Decimal(    Decimal(  Decimal(Decimal(m) + 1)     *    Decimal(Decimal(n) + 1)  )   + Decimal( Decimal(m) * Decimal(n) )       )
else:
    answer = Decimal(   Decimal(Decimal(t[0]) * Decimal(t[1])) // 2  )

print(int(answer))

'''
H = t[0]
W = t[1]
ans = 0
if( W % 2 == 0):
    for i in range(H):
        ans += W / 2
else:
    for i in range(H):
        if(i % 2 == 0):
            ans += W / 2.0 + 0.5
        else:
            ans += W / 2.0 - 0.5
print(int(ans))
'''
Buggy python submission (verdict: Runtime Error):
S, T = map(input().split())
print('{}{}'.format(T, S))

Fixed submission:
S, T = map(str, input().split())
print('{}{}'.format(T, S))

Buggy python submission (verdict: Runtime Error):
S, T = map(int,input().split())
print('{}{}'.format(T,S))

Fixed submission:
S, T = map(str, input().split())
print('{}{}'.format(T, S))
Buggy python submission (verdict: Time Limit Exceeded):
## coding: UTF-8


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

dp = [[0] * (W+1) for _ in range(N)]

for i in range(N):
    for j in range(W+1):
        if(j >= l[i][0]):
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-l[i][0]] + l[i][1])
        else:
            dp[i][j] = dp[i-1][j]
#for k in range(N):
    #print(dp[k])
print(dp[-1][-1])

Fixed submission:
## coding: UTF-8


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

dp = [[0] * (W+1) for _ in range(N)]

for i in range(N):
    for j in range(W+1):
        if(j >= l[i][0]):
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-l[i][0]] + l[i][1])
        else:
            dp[i][j] = dp[i-1][j]
#for k in range(N):
    #print(dp[k])
print(dp[-1][-1])
Buggy python submission (verdict: Runtime Error):
s = input()
print('{}{}{}'.format(s[0],len(s)-2,s[len(s)-1])

Fixed submission:
## coding: UTF-8
s = input()

#print(len(s))
print('{}{}{}'.format(s[0],len(s)-2,s[-1]))
Buggy python submission (verdict: Runtime Error):
## coding: UTF-8
from fractions import gcd
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

print(A)
print(B)
Gcd = math.gcd(A, B)
print(Gcd)

print(C)

if(C % Gcd == 0):
    print("YES")
else:
    print("NO")

Fixed submission:
## coding: UTF-8
from fractions import gcd
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

#print(A)
#print(B)
Gcd = gcd(A, B)
#print(Gcd)

#print(C)

if(C % Gcd == 0):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
## coding: UTF-8
import math
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

Gcd = math.gcd(A, B)
if(C % Gcd == 0):
    print("YES")
else:
    print("NO")

Fixed submission:
## coding: UTF-8
from fractions import gcd
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

#print(A)
#print(B)
Gcd = gcd(A, B)
#print(Gcd)

#print(C)

if(C % Gcd == 0):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
from decimal import *
#exp = Decimal(10**23)
#rint((Decimal(11)*exp)/Decimal(10))

## coding: UTF-8
s = input().split()
t = [int(p) for p in s]
#print(t)

a = t[0]
b = t[1]
x = t[2]

start = a
goal = b
while True:
    if(start % x == 0):
        break
    else:
        start += 1
#print(start)
while True:
    if(goal % x == 0):
        break
    else:
        goal -= 1
#start = Decimal(3)
#goal = Decimal(999999999999999999)

#print(Decimal(goal))
print(Decimal(Decimal(Decimal(goal) - Decimal(start)) / Decimal(x)) + Decimal(1)  ) 
#answer = ((goal - start) / x ) + 1
#print('{}'.format(int(answer)))

Fixed submission:
from decimal import *
#exp = Decimal(10**23)
#rint((Decimal(11)*exp)/Decimal(10))

## coding: UTF-8
s = input().split()
t = [int(p) for p in s]
#print(t)

a = t[0]
b = t[1]
x = t[2]

'''
start = a
goal = b
while True:
    if(start % x == 0):
        break
    else:
        start += 1
#print(start)
while True:
    if(goal % x == 0):
        break
    else:
        goal -= 1
#start = Decimal(3)
#goal = Decimal(999999999999999999)

#print(Decimal(goal))
print(Decimal(Decimal(Decimal(goal) - Decimal(start)) / Decimal(x)) + Decimal(1)  ) 
#answer = ((goal - start) / x ) + 1
#print('{}'.format(int(answer)))
'''

def count_even(t, x):
    return int( Decimal(t)/ Decimal(x) )

if( a == 0):
    answer = count_even(b, x) + 1
else:
    answer = count_even(b, x) - count_even(a-1, x)
print(answer)
Buggy python submission (verdict: Runtime Error):
import math
 
i = input().split()
n = int(i[0])
D = int(i[1])
num_list = []
count = 0
for i in range(n):
	num_list.append(list(map(int,input().split())))
 
for j in num_list:
    x = j[0]
    y = j[1]
    dist = math.sqrt(x ** 2 + y ** 2)
    if dist <= D:
        count += 1
 
print(count)

Fixed submission:
rawtemp = input()
temp = int(rawtemp)

if temp < 30:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
import math

i = input().split()
n = int(i[1])
D = int(i[0])
num_list = []
count = 0
for i in range(n):
	num_list.append(list(map(int,input().split())))

for j in num_list:
    x = j[0]
    y = j[1]
    dist = math.sqrt(x ** 2 + y ** 2)
    if dist <= D:
        count += 1

print(count)

Fixed submission:
import math
 
i = input().split()
n = int(i[0])
D = int(i[1])
num_list = []
count = 0
for i in range(n):
	num_list.append(list(map(int,input().split())))
 
for j in num_list:
    x = j[0]
    y = j[1]
    dist = math.sqrt(x ** 2 + y ** 2)
    if dist <= D:
        count += 1
 
print(count)