TnT/CodeNet4Repair huggingface dataset:
Problem:
A country has a budget of more than 81 trillion yen. We want to process such data, but conventional integer type which uses signed 32 bit can represent up to 2,147,483,647.  Your task is to write a program which reads two integers (more than or equal to zero), and prints a sum of these integers.  If given integers or the sum have more than 80 digits, print "overflow".

Incorrect submission (verdict: Wrong Answer):
def Add(numa, numb):
	longer = (numa if len(numa) >= len(numb) else numb)
	shorter = (numa if len(numa) < len(numb) else numb)
	carry = 0
	result = ''
	for s in range(-1,-len(shorter) - 1, -1):
		ans = int(longer[s]) + int(shorter[s]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	for l in range(-len(shorter) - 1, -len(longer) - 1, -1):
		ans = int(longer[l]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	return (result if carry == 0 else '1' + result)

N = eval(input())
for _ in range(N):
	a = input()
	b = input()
	print(Add(a, b))

Fixed, accepted submission:
def Add(numa, numb):
	longer = (numa if len(numa) >= len(numb) else numb)
	shorter = (numa if len(numa) < len(numb) else numb)
	carry = 0
	result = ''
	for s in range(-1, -len(shorter) - 1, -1):
		ans = int(longer[s]) + int(shorter[s]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	for l in range(-len(shorter) - 1, -len(longer) - 1, -1):
		ans = int(longer[l]) + carry
		if ans >= 10:
			result = str(ans % 10) + result
			carry = 1
		else:
			result = str(ans) + result
			carry = 0
	return (result if carry == 0 else '1' + result)

N = eval(input())
for _ in range(N):
	a = input()
	b = input()
	ans = Add(a, b)
	print('overflow' if len(ans) > 80 else ans)
Problem:
There are N stones arranged in a row. Every stone is painted white or black. A string S represents the color of the stones. The i-th stone from the left is white if the i-th character of S is `.`, and the stone is black if the character is `#`.  Takahashi wants to change the colors of some stones to black or white so that there will be no white stone immediately to the right of a black stone. Find the minimum number of stones that needs to be recolored.

Incorrect submission (verdict: Wrong Answer):
n=int(input())
s=input()
w=[0]
b=[0]

for i in range(len(s)):
    if s[i]=='#':
        w.append(w[-1]+1)
    else:
        w.append(w[-1])
    if s[-i-1]=='.':
        b.append(b[-1]+1)
    else:
        b.append(b[-1])
print(w)
print(b)
total=[]
for i in range(len(s)+1):
    total.append(w[i]+b[-i-1])
print(total)
print(min(total))

Fixed, accepted submission:
n=int(input())
s=input()
w=[0]
b=[0]

for i in range(len(s)):
    if s[i]=='#':
        w.append(w[-1]+1)
    else:
        w.append(w[-1])
    if s[-i-1]=='.':
        b.append(b[-1]+1)
    else:
        b.append(b[-1])
#print(w)
#print(b)
total=[]
for i in range(len(s)+1):
    total.append(w[i]+b[-i-1])
#print(total)
print(min(total))
Problem:
There is a grid with H rows and W columns.  The square at the i-th row and j-th column contains a string S_{i,j} of length 5.  The rows are labeled with the numbers from 1 through H, and the columns are labeled with the uppercase English letters from `A` through the W-th letter of the alphabet.    Exactly one of the squares in the grid contains the string `snuke`. Find this square and report its location.  For example, the square at the 6-th row and 8-th column should be reported as `H6`.

Incorrect submission (verdict: Wrong Answer):
H,M=map(int,input().split())
c=0
for i in range(H):
    S=input().split()
    for j in range(0,M):
        if S[j]=="snuke":
            a=i
            b=j
        else:
            c+=1

print(chr(ord('A')+a) + str(b+1))

Fixed, accepted submission:
H,M=map(int,input().split())
c=0
for i in range(1,H+1):
    S=input().split()
    for j in range(0,M):
        if S[j]=="snuke":
            a=i
            b=j
        else:
            c+=1

print(chr(ord('A')+b) + str(a))
Problem:
There are N integers, A_1, A_2, ..., A_N, written on a blackboard.  We will repeat the following operation N-1 times so that we have only one integer on the blackboard.    * Choose two integers x and y on the blackboard and erase these two integers. Then, write a new integer x-y.  Find the maximum possible value of the final integer on the blackboard and a sequence of operations that maximizes the final integer.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
A = sorted(list(map(int,input().split())))

ans_list = []
p = []
n = []


p.append(A[-1])
n.append(A[0])


for a in A[1:-1]:
    if a >= 0:
        p.append(a)
    elif a < 0:
        n.append(a)


while len(p) != 1:
    x = n.pop()
    y = p.pop()
    n.append(x-y)
    ans_list.append((x, y))


while len(n) != 0:
    x = p.pop()
    y = n.pop()
    p.append(x-y)
    ans_list.append((x,y))


M = p[0]
print(M)
for ans in ans_list:
    print(ans)

Fixed, accepted submission:
N = int(input())
A = sorted(list(map(int,input().split())))

p = A[-1]
n = A[0]

ans_list = []

for a in A[1:-1]:
    if a >= 0:
        ans_list.append((n, a))
        n -= a
    else:
        ans_list.append((p, a))
        p -= a

M = p - n
ans_list.append((p, n))

print(M)
for x, y in ans_list:
    print(x, y)
Problem:
Takahashi has a strong stomach. He never gets a stomachache from eating something whose "best-by" date is at most X days earlier. He gets a stomachache if the "best-by" date of the food is X+1 or more days earlier, though.  Other than that, he finds the food delicious if he eats it not later than the "best-by" date. Otherwise, he does not find it delicious.  Takahashi bought some food A days before the "best-by" date, and ate it B days after he bought it.  Write a program that outputs `delicious` if he found it delicious, `safe` if he did not found it delicious but did not get a stomachache either, and `dangerous` if he got a stomachache.

Incorrect submission (verdict: Wrong Answer):
x, a, b = map(int, input().split())
over = b - a
if over < x:
  print("delicious")
elif x <= over < x + 1:
  print("safe")
else:
  print("dangerous")

Fixed, accepted submission:
x, a, b = map(int, input().split())
over = b - a
if over <= 0:
  print("delicious")
elif over <= x:
  print("safe")
else:
  print("dangerous")
Problem:
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
txy = [list(map(int, input().split())) for _ in range(n)]
print(txy[0])

for i in range(n):
  if txy[i][1] + txy[i][2] >txy[i][0]:
    status = "No"
    break
  elif (txy[i][1]+txy[i][2])%2 != txy[i][0]%2:
    status = "No"
    break
  else:
    status = "Yes"
    
print(status)

Fixed, accepted submission:
n = int(input())
 
x0, y0, t0 = 0, 0, 0
 
for _ in range(n):
  t, x, y = map(int, input().split())
  if abs(x-x0) + abs(y-y0) > t-t0 or (x+y)%2 != t%2:
    status = "No"
    break
  else:
    status = "Yes"
    t0, x0, y0 = t, x, y
    
print(status)
Problem:
AtCoDeer has three cards, one red, one green and one blue.   An integer between 1 and 9 (inclusive) is written on each card: r on the red card, g on the green card and b on the blue card.   We will arrange the cards in the order red, green and blue from left to right, and read them as a three-digit integer.   Is this integer a multiple of 4?

Incorrect submission (verdict: Wrong Answer):
print("No" if int(input().replace(" ",""))%4 else "Yes")

Fixed, accepted submission:
print("NO" if int(input().replace(" ",""))%4 else "YES")
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
l = list(map(int, input().split()))
count_5 = 0
count_7 = 0
for r in l:
  if r == 5:
    count_5 += 1
  if r == 7:
    count_7 += 1
if count_5 == 2 and count_7 == 1:
  print('Yes')
else:
  print('No')

Fixed, accepted submission:
l = list(map(int, input().split()))
count_5 = 0
count_7 = 0
for r in l:
  if r == 5:
    count_5 += 1
  if r == 7:
    count_7 += 1
if count_5 == 2 and count_7 == 1:
  print('YES')
else:
  print('NO')
Problem:
Iroha is very particular about numbers. There are K digits that she dislikes: D_1, D_2, ..., D_K.  She is shopping, and now paying at the cashier. Her total is N yen (the currency of Japan), thus she has to hand at least N yen to the cashier (and possibly receive the change).  However, as mentioned before, she is very particular about numbers. When she hands money to the cashier, the decimal notation of the amount must not contain any digits that she dislikes. Under this condition, she will hand the minimum amount of money.  Find the amount of money that she will hand to the cashier.

Incorrect submission (verdict: Wrong Answer):
n,k=map(int, input().split())
ds=list(map(str, input().split()))
while True:
  for i in ds:
    if i in str(n):
      n+=1
      continue
  break
print(str(n))

Fixed, accepted submission:
fn=str
n,k=map(int, input().split())
ds=list(map(fn, input().split()))
while any(i in fn(n) for i in ds):
  n+=1
print(fn(n))
Problem:
There is a kangaroo at coordinate 0 on an infinite number line that runs from left to right, at time 0. During the period between time i-1 and time i, the kangaroo can either stay at his position, or perform a jump of length exactly i to the left or to the right. That is, if his coordinate at time i-1 is x, he can be at coordinate x-i, x or x+i at time i. The kangaroo's nest is at coordinate X, and he wants to travel to coordinate X as fast as possible. Find the earliest possible time to reach coordinate X.

Incorrect submission (verdict: Wrong Answer):
n = int(input())

t = 0
while t*(t+1) <=2*n:
    t += 1
print(t)

Fixed, accepted submission:
d = int(input())
t = 0 
while True:
  if t*(t+1)//2 >=d:
    print(t)
    exit()
  t +=1
Problem:
Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second. The other child is now at coordinate B, and she can travel the distance of W per second.  He can catch her when his coordinate is the same as hers. Determine whether he can catch her within T seconds (including exactly T seconds later). We assume that both children move optimally.

Incorrect submission (verdict: Wrong Answer):
a,v = map(int,input().split())
b,w = map(int,input().split())
t=int(input())
if abs(a-b)>(v-w)*t:
    print("No")
else:
    print("Yes")

Fixed, accepted submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t=int(input())
if abs(a-b)>(v-w)*t:
    print("NO")
else:
    print("YES")
Problem:
We have N sticks with negligible thickness. The length of the i-th stick is A_i.  Snuke wants to select four different sticks from these sticks and form a rectangle (including a square), using the sticks as its sides. Find the maximum possible area of the rectangle.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = sorted(list(int(i) for i in input().split()),reverse=True)
ans = []
for i in range (n-1):
 if a[i+1] == a[i]:
  ans.append(a[i])
  a[i+1]= 0
  print(a[i])
 if len(ans)>=2:
  cand = ans[0]*ans[1]
  break
else:
 cand = 0
print(cand)

Fixed, accepted submission:
n = int(input())
a = sorted(list(int(i) for i in input().split()),reverse=True)
ans = []
for i in range (n-1):
 if a[i+1] == a[i]:
  ans.append(a[i])
  a[i+1]= 0
 if len(ans)>=2:
  cand = ans[0]*ans[1]
  break
else:
 cand = 0
print(cand)
Problem:
Sitting in a station waiting room, Joisino is gazing at her train ticket.  The ticket is numbered with four digits A, B, C and D in this order, each between 0 and 9 (inclusive).  In the formula A op1 B op2 C op3 D = 7, replace each of the symbols op1, op2 and op3 with `+` or `-` so that the formula holds.  The given input guarantees that there is a solution. If there are multiple solutions, any of them will be accepted.

Incorrect submission (verdict: Wrong Answer):
A, B, C, D = map(int, input())
for i in range(8):
    sum = 0
    op1 = "+" if i // 4 % 2 == 0 else "-"
    op2 = "+" if i // 2 % 2 == 0 else "-"
    op3 = "+" if i % 2 == 0 else "-"
    if op1 == "+":
        sum = A + B
    else:
        sum = A - B
    if op2 == "+":
        sum += C
    else:
        sum -= C
    if op3 == "+":
        sum += D
    else:
        sum -= D
    if sum == 7:
        print(str(A) + op1 + str(B) + op2 + str(C) + op3 + str(D))
        break

Fixed, accepted submission:
A, B, C, D = map(int, input())
for i in range(8):
    sum = 0
    op1 = "+" if i // 4 % 2 == 0 else "-"
    op2 = "+" if i // 2 % 2 == 0 else "-"
    op3 = "+" if i % 2 == 0 else "-"
    if op1 == "+":
        sum = A + B
    else:
        sum = A - B
    if op2 == "+":
        sum += C
    else:
        sum -= C
    if op3 == "+":
        sum += D
    else:
        sum -= D
    if sum == 7:
        print(str(A) + op1 + str(B) + op2 + str(C) + op3 + str(D) + "=7")
        break
Problem:
An elementary school student Takahashi has come to a variety store.  He has two coins, A-yen and B-yen coins (yen is the currency of Japan), and wants to buy a toy that costs C yen. Can he buy it?  Note that he lives in Takahashi Kingdom, and may have coins that do not exist in Japan.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())
if a + b < c:
    print("yes")
else:
    print("No")

Fixed, accepted submission:
a,b,c = map(int,input().split())

if a+b>=c:
    print("Yes")
else:
    print("No")
Problem:
Snuke has decided to construct a string that starts with `A` and ends with `Z`, by taking out a substring of a string s (that is, a consecutive part of s).  Find the greatest length of the string Snuke can construct. Here, the test set guarantees that there always exists a substring of s that starts with `A` and ends with `Z`.

Incorrect submission (verdict: Wrong Answer):


import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().rstrip()
print(S.index('A'))
print(len(S)-(S[::-1].index('Z')+1))
print(abs(S.index('A')-(len(S)-(S[::-1].index('Z')+1)))+1)


Fixed, accepted submission:


import sys
import itertools

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = readline().decode('utf8')
print(-S.find('A') + S.rfind('Z') + 1)
Problem:
We have a board with H horizontal rows and W vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements?  Here the bishop can only move diagonally. More formally, the bishop can move from the square at the r_1-th row (from the top) and the c_1-th column (from the left) to the square at the r_2-th row and the c_2-th column if and only if exactly one of the following holds:    * r_1 + c_1 = r_2 + c_2   * r_1 - c_1 = r_2 - c_2  For example, in the following figure, the bishop can move to any of the red squares in one move:  

Incorrect submission (verdict: Wrong Answer):
h,w = map(int,input().split())
if h%2 == 1 and w%2 == 1: print(h*w/2+1)
else: print(h*w/2)

Fixed, accepted submission:
h,w = map(int,input().split())
ans = (h*w)//2
if h%2 == 1 and w%2 == 1: ans += 1
if h == 1 or w == 1: ans = 1
print(ans)
Problem:
We have N squares assigned the numbers 1,2,3,\ldots,N. Each square has an integer written on it, and the integer written on Square i is a_i.  How many squares i satisfy both of the following conditions?    * The assigned number, i, is odd.   * The written integer is odd.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

cnt=0
for i in range(len(a)):
    if (i+1)&1==a[i]==1:
        cnt+=1
print(cnt)

Fixed, accepted submission:
n = int(input())
a = list(map(int,input().split()))

cnt=0
for i in range(len(a)):
    if (i+1)&1==a[i]&1==1:
        cnt+=1
print(cnt)
Problem:
We have a board with H horizontal rows and W vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements?  Here the bishop can only move diagonally. More formally, the bishop can move from the square at the r_1-th row (from the top) and the c_1-th column (from the left) to the square at the r_2-th row and the c_2-th column if and only if exactly one of the following holds:    * r_1 + c_1 = r_2 + c_2   * r_1 - c_1 = r_2 - c_2  For example, in the following figure, the bishop can move to any of the red squares in one move:  

Incorrect submission (verdict: Wrong Answer):
H, W = map(int, input().split())
if H == 1 or W == 1:
    ans = 1
elif (H * W) % 2 == 0:
    ans = (H * W) / 2
else:
    ans = (H * W) // 2 + 1
print (ans)

Fixed, accepted submission:
H, W = map(int, input().split())
if H == 1 or W == 1:
    ans = 1
elif (H * W) % 2 == 0:
    ans = (H * W) // 2
else:
    ans = (H * W) // 2 + 1
print (ans)
Problem:
Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).

Incorrect submission (verdict: Wrong Answer):
N, A, B = map(int, input().split())
someSums = 0
for i in range(1, N+1):
    if A <= (i // 1000 % 10) + (i // 100 % 10) + (i // 10 % 10) + (i % 10) <= B:
        someSums += i
        print(i)
print(someSums)

Fixed, accepted submission:
N, A, B = map(int, input().split())
someSums = 0
for i in range(1, N+1):
    if A <= (i // 10000) % 10 + (i // 1000) % 10 + (i // 100) % 10 + (i // 10) % 10 + (i % 10) <= B:
        someSums += i
print(someSums)
Problem:
AtCoDeer the deer has found two positive integers, a and b. Determine whether the concatenation of a and b in this order is a square number.

Incorrect submission (verdict: Wrong Answer):
import sys
# A,B,C = [int(n) for n in input().split()]
# N = int(input())
# S = str(input())
# T = str(input())
a,b = [str(n) for n in input().split()]

ab = int(a+b)
print(ab)
table = [n*n for n in range(1,101)]
print("Yes" if ab in table else "No")


Fixed, accepted submission:
import sys
a, b = input().split()
ab = int(str(a) + str(b))
s = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924, 14161, 14400, 14641, 14884, 15129, 15376, 15625, 15876, 16129, 16384, 16641, 16900, 17161, 17424, 17689, 17956, 18225, 18496, 18769, 19044, 19321, 19600, 19881, 20164, 20449, 20736, 21025, 21316, 21609, 21904, 22201, 22500, 22801, 23104, 23409, 23716, 24025, 24336, 24649, 24964, 25281, 25600, 25921, 26244, 26569, 26896, 27225, 27556, 27889, 28224, 28561, 28900, 29241, 29584, 29929, 30276, 30625, 30976, 31329, 31684, 32041, 32400, 32761, 33124, 33489, 33856, 34225, 34596, 34969, 35344, 35721, 36100, 36481, 36864, 37249, 37636, 38025, 38416, 38809, 39204, 39601, 40000, 40401, 40804, 41209, 41616, 42025, 42436,
42849, 43264, 43681, 44100, 44521, 44944, 45369, 45796, 46225, 46656, 47089, 47524, 47961, 48400, 48841, 49284, 49729, 50176, 50625, 51076, 51529, 51984, 52441, 52900, 53361, 53824, 54289, 54756, 55225, 55696, 56169, 56644, 57121, 57600, 58081, 58564, 59049,
59536, 60025, 60516, 61009, 61504, 62001, 62500, 63001, 63504, 64009, 64516, 65025, 65536, 66049, 66564, 67081, 67600, 68121, 68644, 69169, 69696, 70225, 70756, 71289, 71824, 72361, 72900, 73441, 73984, 74529, 75076, 75625, 76176, 76729, 77284, 77841, 78400, 78961, 79524, 80089, 80656, 81225, 81796, 82369, 82944, 83521, 84100, 84681, 85264, 85849, 86436, 87025, 87616, 88209, 88804, 89401, 90000, 90601, 91204, 91809, 92416, 93025, 93636, 94249, 94864, 95481, 96100, 96721, 97344, 97969, 98596, 99225, 99856]
print("Yes" if ab in s else "No")
Problem:
Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.  The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)  Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Incorrect submission (verdict: Wrong Answer):
X = int(input())

t = 100

result = 0


while t >= X:
    t += t // 100
    result += 1
print(result)

Fixed, accepted submission:
X = int(input())
n = 100

count = 0
while n < X:
  
  count += 1
  n = int(n * 1.01)
print(count)
Problem:
M-kun has the following three cards:    * A red card with the integer A.   * A green card with the integer B.   * A blue card with the integer C.  He is a genius magician who can do the following operation at most K times:    * Choose one of the three cards and multiply the written integer by 2.  His magic is successful if both of the following conditions are satisfied after the operations:    * The integer on the green card is **strictly** greater than the integer on the red card.   * The integer on the blue card is **strictly** greater than the integer on the green card.  Determine whether the magic can be successful.

Incorrect submission (verdict: Wrong Answer):
def main():
    r,g,b=map(int,input().split())
    k=int(input())
    while(k>0):
        if(g<=r):
            g<<1
            k-=1
        elif(b<=g):
            b<<1
            k-=1
    if(r<g and g<b):
        print('Yes')
    else:
        print('No')
    
main()


Fixed, accepted submission:
def main():
    r,g,b=map(int,input().split())
    k=int(input())
    while(k>0):
        if(g<=r):
            g=g<<1
            k-=1
        elif(b<=g):
            b=b<<1
            k-=1
        else:
            break;
    if(r<g and g<b):
        print('Yes')
    else:
        print('No')
    
main()
Problem:
Write a program which reads three integers a, b and c, and prints the number of divisors of c between a and b.

Incorrect submission (verdict: Time Limit Exceeded):
cnt=0
a,b,c=map(int,input().split())
while True:
	if b-a<=0:break
	for i in range(a,b):
		if (c%a==0):
			cnt+=1
			a+=1
	print(cnt)

Fixed, accepted submission:
cnt=0
a,b,c=map(int,input().split())
for i in range(a,b+1):
	if (c%i==0):
			cnt+=1
print(cnt)
Problem:
Takahashi bought a piece of apple pie at ABC Confiserie. According to his memory, he paid N yen (the currency of Japan) for it.  The consumption tax rate for foods in this shop is 8 percent. That is, to buy an apple pie priced at X yen before tax, you have to pay X \times 1.08 yen (rounded down to the nearest integer).  Takahashi forgot the price of his apple pie before tax, X, and wants to know it again. Write a program that takes N as input and finds X. We assume X is an integer.  If there are multiple possible values for X, find any one of them. Also, Takahashi's memory of N, the amount he paid, may be incorrect. If no value could be X, report that fact.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
x = n // 1.08
if x * 1.08 == n:
    print(x)
else:
    print(':(')

Fixed, accepted submission:
n = int(input())
x = int(n // 1.08)
if int(x * 1.08) == n:
    print(x)
    exit()
x = x + 1
if int(x * 1.08) == n:
    print(x)
else:
    print(':(')