TnT/CodeNet4Repair huggingface dataset:
Problem:
You are given a positive integer X. Find the largest _perfect power_ that is at most X. Here, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not less than 2.

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

for i in range(1,32):
    for j in range(2,11):
        ql.append(i**j)
        #print(ql)
        if max(ql) > X: 
            print(ql[-2])
            exit()

Fixed, accepted submission:
x = int(input())
c = 1

for b in range(1,x):
    for p in range(2,x):
        if b**p <= x:
            c = max(c,b**p)
        else:
            break

print(c)
Problem:
Snuke has a favorite restaurant.  The price of any meal served at the restaurant is 800 yen (the currency of Japan), and each time a customer orders 15 meals, the restaurant pays 200 yen back to the customer.  So far, Snuke has ordered N meals at the restaurant. Let the amount of money Snuke has paid to the restaurant be x yen, and let the amount of money the restaurant has paid back to Snuke be y yen. Find x-y.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
p = 1
for i in range(1, N + 1):
    p = (i*p) % (10**9 + 7)

print(p)

Fixed, accepted submission:
n = int(input())
x = 800*n
y = 200*(n//15)
print(x-y)
Problem:
Write a program which reads two integers a, b and an operator op, and then prints the value of a op b.  The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part.

Incorrect submission (verdict: Wrong Answer):
while True :
    a,op,b = input().split()
    a,b = map(int, [a, b])
    if op == "?":
        break
    if op == "+":
        print(a+b)
    elif op == "-":
        print(a-b)
    elif op == "*":
        print(a*b)
    elif op == "/":
        print(a%b)





Fixed, accepted submission:
while True :
    a,op,b = input().split()
    a,b = map(int, [a, b])
    if op == "?":
        break
    if op == "+":
        print(a+b)
    elif op == "-":
        print(a-b)
    elif op == "*":
        print(a*b)
    elif op == "/":
        print(a//b)
Problem:
AtCoder Inc. has decided to lock the door of its office with a 3-digit PIN code.  The company has an N-digit lucky number, S. Takahashi, the president, will erase N-3 digits from S and concatenate the remaining 3 digits without changing the order to set the PIN code.  How many different PIN codes can he set this way?  Both the lucky number and the PIN code may begin with a 0.

Incorrect submission (verdict: Wrong Answer):
def main():
    from sys import stdin
    import itertools
    n = int(stdin.readline().rstrip())
    s = str(stdin.readline().rstrip())
    g = set({})

    for key in itertools.combinations(s,3):
        g.add(key)
    
    print(len(g))

Fixed, accepted submission:
def main():
    from sys import stdin
    n = int(stdin.readline().rstrip())
    s = list(map(int,list(stdin.readline().rstrip())))
    ans=0
    g = set(list(range(10))) - set(s)
    for i in range(1000):
        tap = (i//100,(i//10)%10,i%10)
        if set(tap) & g == set({}):
            flag = 0
            for p in s:
                if flag == 0:
                    if p==tap[0]:
                        flag = 1
                elif flag == 1:
                    if p==tap[1]:
                        flag = 2
                elif flag == 2:
                    if p==tap[2]:
                        flag = 0
                        ans+=1
                        break
        else:
            continue

    
    print(ans)
main()
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
s=[]
for x in range(n):
    s.append(input())
a={"AC":0, "WA":0,"TLE":0,"RE":0}
for x in s:
    print(x)
    a[x]+=1
print("AC x %s" % a["AC"])
print("WA x %s" % a["WA"])
print("TLE x %s" % a["TLE"])
print("RE x %s" % a["RE"])

Fixed, accepted submission:
n = int(input())
s=[]
for x in range(n):
    s.append(input())
a={"AC":0, "WA":0,"TLE":0,"RE":0}
for x in s:
    a[x]+=1
print("AC x %s" % a["AC"])
print("WA x %s" % a["WA"])
print("TLE x %s" % a["TLE"])
print("RE x %s" % a["RE"])
Problem:
There is a cave.  The cave has N rooms and M passages. The rooms are numbered 1 to N, and the passages are numbered 1 to M. Passage i connects Room A_i and Room B_i bidirectionally. One can travel between any two rooms by traversing passages. Room 1 is a special room with an entrance from the outside.  It is dark in the cave, so we have decided to place a signpost in each room except Room 1. The signpost in each room will point to one of the rooms directly connected to that room with a passage.  Since it is dangerous in the cave, our objective is to satisfy the condition below for each room except Room 1.    * If you start in that room and repeatedly move to the room indicated by the signpost in the room you are in, you will reach Room 1 after traversing the minimum number of passages possible.  Determine whether there is a way to place signposts satisfying our objective, and print one such way if it exists.

Incorrect submission (verdict: Wrong Answer):
n,m = map(int,input().split())
d = {i:set([]) for i in range(1,n+1)}
e={i:0 for i in range(1,n+1)}
s={i for i in range(1,n+1)}
for _ in range(m):
    a,b = map(int,input().split())
    d[a]|={b}
    d[b]|={a}
    s-={a,b}
if len(s)!=0:
    print("No")
else:
    print("Yes",d)
    s={1}
    point=0
    while(n>0):
        t=set([])
        point+=1
        for i in s:
            for j in d[i]:
                if e[j]==0:
                    e[j]=point
                    t|={j}
                    n-=1
        s=t
    for k,v in e.items():
        if k>0:
            print(v)

Fixed, accepted submission:
n,m = map(int,input().split())
d = {i:set([]) for i in range(1,n+1)}
e={i:0 for i in range(1,n+1)}
s={i for i in range(1,n+1)}
for _ in range(m):
    a,b = map(int,input().split())
    d[a]|={b}
    d[b]|={a}
    s-={a,b}
if len(s)!=0:
    print("No")
else:
    print("Yes")
    s={1}
    while(n>0):
        t=set([])
        for i in s:
            for j in d[i]:
                if e[j]==0:
                    e[j]=i
                    t|={j}
                    n-=1
        s=t
    for k,v in e.items():
        if k>1:
            print(v)
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())
count = 0
A = 100
while A <= X:
    A = int(A * 1.01)
    count += 1
print(count)


Fixed, accepted submission:
X = int(input())
count = 0
A = 100
while A < X:
    A = int(A * 1.01)
    count += 1
print(count)
Problem:
Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:    * 1 \leq x,y,z   * x^2 + y^2 + z^2 + xy + yz + zx = n  Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

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

ans=0
for i in range(1,N):
    for j in range(1,N):
        for k in range(1,N):
            for l in range(1,N):
                if l**2+j**2+k**2+l*j+j*k+k*l==i:
                    ans+=1
    print(ans)
    ans=0

Fixed, accepted submission:
N=int(input())

ans=[0]*N

for i in range(1,int(N**0.5)):
    if i**2 >=N:
        break
    for j in range(1,int(N**0.5)):
            if i**2+j**2+i*j>=N:
                break
            for k in range(1,int(N**0.5)):
                    if i**2+j**2+k**2+i*j+j*k+k*i <=N:
                        ans[i**2+j**2+k**2+i*j+j*k+k*i-1] +=1

for i in range(N):
    print(ans[i])
Problem:
There are N participants in the CODE FESTIVAL 2016 Qualification contests. The participants are either students in Japan, students from overseas, or neither of these.  Only Japanese students or overseas students can pass the Qualification contests. The students pass when they satisfy the conditions listed below, from the top rank down. Participants who are not students cannot pass the Qualification contests.    * A Japanese student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B.   * An overseas student passes the Qualification contests if the number of the participants who have already definitively passed is currently fewer than A+B and the student ranks B-th or above among all overseas students.  A string S is assigned indicating attributes of all participants. If the i-th character of string S is `a`, this means the participant ranked i-th in the Qualification contests is a Japanese student; `b` means the participant ranked i-th is an overseas student; and `c` means the participant ranked i-th is neither of these.  Write a program that outputs for all the participants in descending rank either `Yes` if they passed the Qualification contests or `No` if they did not pass.

Incorrect submission (verdict: Wrong Answer):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N, A, B = ri_()
S = rs()
a = 0
b = 0
for i in S:
    if i == 'a':
        if a + b <= A + B:
            print('Yes')
        else:
            print('No')
        a += 1
    elif i == 'b':
        if a + b <= A + B and b < B:
            print('Yes')
        else:
            print('No')
        b += 1
    else:
        print('No')

Fixed, accepted submission:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

N, A, B = ri_()
S = rs()
a = 0
b = 0
for i in S:
    if i == 'a':
        if a < A + B:
            print('Yes')
            a += 1
        else:
            print('No')
    elif i == 'b':
        if a < A + B and b <= B - 1:
            print('Yes')
            a += 1
        else:
            print('No')
        b += 1
    else:
        print('No')
Problem:
Snuke has N hats. The i-th hat has an integer a_i written on it.  There are N camels standing in a circle. Snuke will put one of his hats on each of these camels.  If there exists a way to distribute the hats to the camels such that the following condition is satisfied for every camel, print `Yes`; otherwise, print `No`.    * The bitwise XOR of the numbers written on the hats on both adjacent camels is equal to the number on the hat on itself.  What is XOR? The bitwise XOR x_1 \oplus x_2 \oplus \ldots \oplus x_n of n non- negative integers x_1, x_2, \ldots, x_n is defined as follows: - When x_1 \oplus x_2 \oplus \ldots \oplus x_n is written in base two, the digit in the 2^k's place (k \geq 0) is 1 if the number of integers among x_1, x_2, \ldots, x_n whose binary representations have 1 in the 2^k's place is odd, and 0 if that count is even. For example, 3 \oplus 5 = 6.

Incorrect submission (verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
num=a[0]
for i in range(1,n):
    num=num^a[i]
if num==1:
    print("Yes")
else:
    print("No")


Fixed, accepted submission:
n=int(input())
a=list(map(int,input().split()))
num=a[0]
for i in range(1,n):
    num=num^a[i]
if max(a)==(2**(n-3))+(2**(n-4)):
    print("No")
elif max(a)==min(a) and a[0]!=0:
    print("No")
elif num<=1:
    print("Yes")
else:
    print("No")
Problem:
You are given a grid with 2 rows and 3 columns of squares. The color of the square at the i-th row and j-th column is represented by the character C_{ij}.  Write a program that prints `YES` if this grid remains the same when rotated 180 degrees, and prints `NO` otherwise.

Incorrect submission (verdict: Wrong Answer):
a,b=[input() for _ in range(2)]
print("Yes" if a == b[::-1] else "No")

Fixed, accepted submission:
a,b=[input() for _ in range(2)]
print("YES" if a == b[::-1] else "NO")
Problem:
JOI 国ではサッカーが人気であり，JOI リーグというリーグ戦が毎週行われている．  JOI リーグには N 個のチームが所属していて，1 から N までの番号がつけられている．すべての組み合わせの試合がちょうど一度ずつ行われる．つまり， N × (N - 1) / 2 試合が行われる．各試合の勝敗はそれぞれのチームの得点で決まる．勝ったチームの勝ち点は 3 点であり，負けたチームの勝ち点は 0 点である．引き分けの場合，両チームの勝ち点は 1 点である．順位は各チームの獲得した勝ち点の合計で決定し，得失点差は考えない．勝ち点の合計が等しいチームの順位は上位に揃える．  例として， 4 チームでのリーグ戦を考える．4 × (4 - 1) / 2 = 6 試合が行われる．それらの結果が以下の表のようになったとする．ハイフンの左側はその横のチームの得点であり，右側はその縦のチームの得点である．  |   チーム 1   |   チーム 2   |   チーム 3   |   チーム 4   |   勝ち数   |   負け数   |   引き分け数 |   勝ち点   ---|---|---|---|---|---|---|---|---     チーム 1   | \--- | 0 - 1 | 2 - 1 | 2 - 2 | 1 | 1 | 1 | 4     チーム 2   | 1 - 0 | \--- | 1 - 1 | 3 - 0 | 2 | 0 | 1 | 7     チーム 3   | 1 - 2 | 1 - 1 | \--- | 1 - 3 | 0 | 2 | 1 | 1     チーム 4   | 2 - 2 | 0 - 3 | 3 - 1 | \--- | 1 | 1 | 1 | 4       このとき，勝ち点の最も多いチーム 2 が 1 位である． その次に勝ち点が多いチームはチーム 1 とチーム 4 であり，これらのチームの順位は共に 2 位である． そして勝ち点が最も少ないチーム 3 が 4 位である．  全ての試合の結果が与えられたとき，各チームの順位を求めるプログラムを作成せよ．

Incorrect submission (verdict: Wrong Answer):
def f():
 N=int(input())
 s=[0]*N
 for _ in[0]*(N*~-N//2):
  a,b,c,d=map(int,input().split())
  s[a-1]+=3*(c>d)+(c==d)
  s[b-1]+=3*(d>c)+(d==c)
 b=[[]for _ in[0]*N*3]
 for i in range(N):b[s[i]]+=[i]
 r=1
 for x in b[::-1]:
  for y in x:s[y]=r;r+=1
 print(*s,sep='\n')
f()


Fixed, accepted submission:
def f():
 from heapq import heappop, heappush
 N=int(input())
 r=[0]*N
 for _ in[0]*(N*~-N//2):
  a,b,c,d=map(int,input().split())
  r[a-1]+=3*(c>d)+(c==d)
  r[b-1]+=3*(d>c)+(d==c)
 b=[[]for _ in[0]*N*3]
 for i in range(N):b[r[i]]+=[i]
 pq = []
 for i, s in enumerate(r):heappush(pq,[-s,i])
 rank=1
 display_rank=1
 prev_score=float('inf')
 while pq:
  s,i=heappop(pq)
  if s!=prev_score:rank=display_rank
  r[i]=rank
  display_rank+=1
  prev_score=s
 print(*r,sep='\n')
f()
Problem:
You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are X yen in total?  Coins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.

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

if X%100 == 50:
  X -= 50

c = 0

m500 = min(X//500, A) 
for m in range(m500+1):
  c += min((X-500*m)//100 + 1, B + 1)

Fixed, accepted submission:
A = int(input())
B = int(input())
C = int(input())
X = int(input())

c = 0

m500 = min(X//500, A) 
for i in range(m500+1):
  Y = X - i * 500
  m100 = min(Y//100, B) 
  for j in range(m100+1):
    Z = Y - j * 100
    if Z <= C*50:
      c += 1

print(c)
Problem:
Taro's summer vacation starts tomorrow, and he has decided to make plans for it now.  The vacation consists of N days. For each i (1 \leq i \leq N), Taro will choose one of the following activities and do it on the i-th day:    * A: Swim in the sea. Gain a_i points of happiness.   * B: Catch bugs in the mountains. Gain b_i points of happiness.   * C: Do homework at home. Gain c_i points of happiness.  As Taro gets bored easily, he cannot do the same activities for two or more consecutive days.  Find the maximum possible total points of happiness that Taro gains.

Incorrect submission (verdict: Wrong Answer):

N = int(input())
import numpy as np
koufuku = np.array( [list(map(int, input().split())) for i in range(N)] )
dp_kof = [0]*(N)


#
dp_kof[0] = ( max( koufuku[0,:] ) , np.argmax(koufuku[0,:]) )

for i in range(N-1):
    
    tomorr_i = np.argmax(koufuku[i+1,:]) 
    tomorr_ko = koufuku[i+1,:]              
    dp_i = dp_kof[i][1]                
    today_ko = koufuku[i,:]              
    if tomorr_i != dp_i: 
        dp_kof[i+1] =( dp_kof[i][0] + np.max(tomorr_ko) , tomorr_i)
    else:
        tomorr_no2 = np.sort(tomorr_ko)[-2] 
        tomorr_no2_i = koufuku[i+1].argsort()[-2] のindex
        dp_kof[i+1] =( dp_kof[i][0] + tomorr_no2 , tomorr_no2_i ) 

print(dp_kof[N-1][0])

Fixed, accepted submission:
 

N = int(input())
a=[]
b=[]
c=[]
for i in range(N):
    a1,b1,c1 = (int(x) for x in input().split())
    
    a.append(a1)
    b.append(b1)
    c.append(c1)

dp_A = [0]*(N) ;dp_A[0] =a[0] 
dp_B = [0]*(N) ;dp_B[0] =b[0] 
dp_C = [0]*(N) ;dp_C[0] =c[0] 


#
for i in range(0,N-1):
    dp_A[i+1] = max(dp_B[i] + a[i+1] , dp_C[i] + a[i+1])
    dp_B[i+1] = max(dp_A[i] + b[i+1] , dp_C[i] + b[i+1])
    dp_C[i+1] = max(dp_A[i] + c[i+1] , dp_B[i] + c[i+1])
print(max (dp_A[N-1],dp_B[N-1],dp_C[N-1]) )
Problem:
You are given a image with a height of H pixels and a width of W pixels. Each pixel is represented by a lowercase English letter. The pixel at the i-th row from the top and j-th column from the left is a_{ij}.  Put a box around this image and output the result. The box should consist of `#` and have a thickness of 1.

Incorrect submission (verdict: Wrong Answer):
h,w = map(int,input().split())
pic = [str(input()) for _ in range(h)]


for i in range(-1,h+1):
    if i == -1 or i == h:
        print(*['#'] * (h+2),sep='')
    else:
        print('#'+pic[i]+'#')


Fixed, accepted submission:
h,w = map(int,input().split())
pic = [str(input()) for _ in range(h)]


for i in range(-1,h+1):
    if i == -1 or i == h:
        print(*['#'] * (w+2),sep='')
    else:
        print('#'+pic[i]+'#')
Problem:
There is a cave.  The cave has N rooms and M passages. The rooms are numbered 1 to N, and the passages are numbered 1 to M. Passage i connects Room A_i and Room B_i bidirectionally. One can travel between any two rooms by traversing passages. Room 1 is a special room with an entrance from the outside.  It is dark in the cave, so we have decided to place a signpost in each room except Room 1. The signpost in each room will point to one of the rooms directly connected to that room with a passage.  Since it is dangerous in the cave, our objective is to satisfy the condition below for each room except Room 1.    * If you start in that room and repeatedly move to the room indicated by the signpost in the room you are in, you will reach Room 1 after traversing the minimum number of passages possible.  Determine whether there is a way to place signposts satisfying our objective, and print one such way if it exists.

Incorrect submission (verdict: Wrong Answer):
from collections import deque

n, m =map(int, input().split())

ans = [-1 for _ in range(n+1)]
ans[0] = 0
ans[1] = 0

V = [[] for _ in range(n+1)]

for _ in range(m):
    x, y = map(int, input().split())
    V[x].append(y)
    V[y].append(x)
print(V)

d = deque([1])

while d:
    l = d.popleft()
    for v in V[l]:
        if ans[v] != -1:
            continue
        d.append(v)
        ans[v] = l

    
if ans.count(-1) > 0:
    print('No')
else :
    print('Yes')
    print(*ans[2:], sep="\n")


Fixed, accepted submission:
from collections import deque

n, m =map(int, input().split())

ans = [-1 for _ in range(n+1)]
ans[0] = 0
ans[1] = 0

V = [[] for _ in range(n+1)]

for _ in range(m):
    x, y = map(int, input().split())
    V[x].append(y)
    V[y].append(x)

d = deque([1])

while d:
    l = d.popleft()
    for v in V[l]:
        if ans[v] != -1:
            continue
        ans[v] = l
        d.append(v)
        

    
if ans.count(-1) > 0:
    print('No')
else :
    print('Yes')
    print(*ans[2:], sep="\n")
Problem:
In programming languages like C/C++, a goto statement provides an unconditional jump from the "goto" to a labeled statement. For example, a statement "goto CHECK_NUM;" is executed, control of the program jumps to CHECK_NUM. Using these constructs, you can implement, for example, loops.  Note that use of goto statement is highly discouraged, because it is difficult to trace the control flow of a program which includes goto.  Write a program which does precisely the same thing as the following program (this example is wrtten in C++). Let's try to write the program without goto statements.                 void call(int n){   int i = 1;  CHECK_NUM:   int x = i;   if ( x % 3 == 0 ){     cout << " " << i;     goto END_CHECK_NUM;   }  INCLUDE3:   if ( x % 10 == 3 ){     cout << " " << i;     goto END_CHECK_NUM;   }   x /= 10;   if ( x ) goto INCLUDE3;  END_CHECK_NUM:   if ( ++i <= n ) goto CHECK_NUM;    cout << endl; }

Incorrect submission (verdict: Wrong Answer):
n = int(input())
for i in range(1,n+1):
    if i % 3 == 0 or str(i).find("3"):
        print(" " + str(i),end = "")
print()


Fixed, accepted submission:
n = int(input())
for i in range(1,n+1):
    if i % 3 == 0 or str(i).find("3") != -1:
        print(" " + str(i),end = "")
print()
Problem:
Our world is one-dimensional, and ruled by two empires called Empire A and Empire B.  The capital of Empire A is located at coordinate X, and that of Empire B is located at coordinate Y.  One day, Empire A becomes inclined to put the cities at coordinates x_1, x_2, ..., x_N under its control, and Empire B becomes inclined to put the cities at coordinates y_1, y_2, ..., y_M under its control.  If there exists an integer Z that satisfies all of the following three conditions, they will come to an agreement, but otherwise war will break out.    * X < Z \leq Y   * x_1, x_2, ..., x_N < Z   * y_1, y_2, ..., y_M \geq Z  Determine if war will break out.

Incorrect submission (verdict: Wrong Answer):
N, M, X, Y = map(int, input().split())
x_targets = [int(i) for i in input().split()]
y_targets = [int(i) for i in input().split()]

array_1 = [i for i in range(X + 1, Y + 1)]
array_2 = [i for i in range(max(x_targets) + 1, min(y_targets) + 1)]
if len(set(array_1)) == len(set(array_2)):
    print('No War')
else:
    print('War')

Fixed, accepted submission:
N, M, X, Y = map(int, input().split())
x_targets = [int(i) for i in input().split()]
y_targets = [int(i) for i in input().split()]

array_1 = [i for i in range(X + 1, Y + 1)]
array_2 = [i for i in range(max(x_targets) + 1, min(y_targets) + 1)]
array_and = set(array_1) & set(array_2)
if len(array_and) != 0:
    print('No War')
else:
    print('War')
Problem:
AtCoder Mart sells 1000000 of each of the six items below:    * Riceballs, priced at 100 yen (the currency of Japan) each   * Sandwiches, priced at 101 yen each   * Cookies, priced at 102 yen each   * Cakes, priced at 103 yen each   * Candies, priced at 104 yen each   * Computers, priced at 105 yen each  Takahashi wants to buy some of them that cost exactly X yen in total. Determine whether this is possible.   (Ignore consumption tax.)

Incorrect submission (verdict: Wrong Answer):
x=int(input())
n=x//100
m=x//105
print(n,m)
for i in range(m,n+1):
  if 100*i<=x<=105*i:
    print(1)
    exit()
print(0)

Fixed, accepted submission:
x=int(input())
n=x//100
m=x//105
for i in range(m,n+1):
  if 100*i<=x<=105*i:
    print(1)
    exit()
print(0)
Problem:
Write a program which reads an integer $S$ [second] and converts it to $h:m:s$ where $h$, $m$, $s$ denote hours, minutes (less than 60) and seconds (less than 60) respectively.

Incorrect submission (verdict: Wrong Answer):
S = int(input())
h = S/3600
m = S- (h*3600)/60
sec = S- h*3600-m*60;


Fixed, accepted submission:
S = int(input())
h = int(S/3600)
m = int((S- h*3600)/60)
sec = S- h*3600-m*60;
print(str(h)+":"+str(m)+":"+str(sec))