TnT/CodeNet4Repair huggingface dataset:
Problem:
Give a pair of integers (A, B) such that A^5-B^5 = X. It is guaranteed that there exists such a pair for the given integer X.

Incorrect submission (verdict: Wrong Answer):
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    X = ii()
    for a in range(-70, 70):
        b5 = a**5 - X
        b = meg(lambda v: v**5<=b5, -100, 100)
        if b**5==b5:
            print(a, b)
            return

main()



Fixed, accepted submission:
from itertools import count

def main():
    X = int(input())
    for i in count():
        for A in (-i, i):
            for B in range(-i, i+1):
                if A**5 - B**5 == X:
                    print(A, B)
                    return


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=[input() for i in range(N)]
AC=0
WA=0
TLE=0
RE=0
for i in S:
    if i =="WA":
        WA+=1
    elif i=="AC":
        AC+=1
    elif i=="TLE":
        TLE+=1
    else:
        RE+=1
print("AC x　"+str(AC))
print("WA x "+str(WA))
print("TLE x",TLE)
print("RE x",RE)

Fixed, accepted submission:
N=int(input())
S=[input() for i in range(N)]
AC=0
WA=0
TLE=0
RE=0
for i in S:
    if i =="WA":
        WA+=1
    elif i=="AC":
        AC+=1
    elif i=="TLE":
        TLE+=1
    else:
        RE+=1
print("AC x",str(AC))
print("WA x",str(WA))
print("TLE x",TLE)
print("RE x",RE)
Problem:
You are given two positive integers a and b. Let x be the average of a and b. Print x rounded up to the nearest integer.

Incorrect submission (verdict: Wrong Answer):
a,b = [int(x) for x in input().split()]

print(((a + b) // 2) + 1)


Fixed, accepted submission:
a,b = map(int, input().split())
total = a + b
print((total+2-1) // 2)
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:
    print(1)
    exit()
s =h* w
if s%2 ==1:
    print(s/2 +0.5)
else:
    print(s/2)

Fixed, accepted submission:
import math 
h, w = map(int, input().split())
if h ==1 or w == 1:
    print(1)
    exit()
s =h* w
if s%2 ==1:
    print(int(math.ceil(s/2)))
else:
    print(int(s/2))
Problem:
Write a program which reads three integers, and prints them in ascending order.

Incorrect submission (verdict: Wrong Answer):
a=input()
b=a.split()
d=list()
for c in b:
    d.append(int(c))
print(d[0],d[1],d[2])


Fixed, accepted submission:
a=input()
b=a.split()
d=list()
for c in b:
    d.append(int(c))
d=sorted(d)
print(d[0],d[1],d[2])
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):
r, g, b = map(int, input().split())

if (g % 2 == 0) and (b % 2 == 0):
    print('YES')
else:
    print('NO')


Fixed, accepted submission:
r, g, b = map(int, input().split())
rgb = int(r * 100 + g * 10 + b)
if rgb % 4 == 0:
    print('YES')
else:
    print('NO')
Problem:
It is November 18 now in Japan. By the way, 11 and 18 are adjacent Lucas numbers.  You are given an integer N. Find the N-th Lucas number.  Here, the i-th Lucas number L_i is defined as follows:    * L_0=2   * L_1=1   * L_i=L_{i-1}+L_{i-2} (i≥2)

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a0 = 2
a1 = 1

if n == 1:
    print(2)
elif n == 2:
    print(1)
else:
    for i in range(n-1):
        a0,a1 = a1,(a0+a1)
        print(a0,a1)
    print(a1)

Fixed, accepted submission:
n = int(input())
a0 = 2
a1 = 1

if n == 1:
    print(1)
else:
    for i in range(n-1):
        a0,a1 = a1,(a0+a1)
    print(a1)
Problem:
Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.

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

for i in range(N):
    hens=list(map(int, input().split()))
    hens.sort()
    if hens[0]**2+hens[1]**2==hens[2]**2:
        print("Yes")
    else:
        print("No")

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

for i in range(N):
    hens=list(map(int, input().split()))
    hens.sort()
    if hens[0]**2+hens[1]**2==hens[2]**2:
        print("YES")
    else:
        print("NO")
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):
B =  map(int, input().split())
counter = 0
five_seven_five = [5,7,5]
for i in B:
    if i in five_seven_five:
        counter += 1
        five_seven_five.remove(i)
    else:
        print('No')
if counter ==3:
    print('Yes')

Fixed, accepted submission:
B =  list(map(int, input().split()))
counter = 0
five_seven_five = [5,7,5]
for i in B:
    if i in five_seven_five:
        counter += 1
        five_seven_five.remove(i)
    else:
        print('NO')
if counter ==3:
    print('YES')
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
N=int(input())
A=N//1000*1000
print(N-A)

Fixed, accepted submission:
N=int(input())
A=(N//1000+1)*1000
if A-N==1000:
    ans=0
else:
    ans=A-N
print(ans)
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):
n=int(input())
for i in range(n):
    a=int(input())
    b=int(input())
    if a+b>=10**79:print("overflow")
    else:print(a+b)


Fixed, accepted submission:
n=int(input())
for i in range(n):
    a=int(input())
    b=int(input())
    if a+b>=10**80:print("overflow")
    else:print(a+b)
Problem:
The postal code in Atcoder Kingdom is A+B+1 characters long, its (A+1)-th character is a hyphen `-`, and the other characters are digits from `0` through `9`.  You are given a string S. Determine whether it follows the postal code format in Atcoder Kingdom.

Incorrect submission (verdict: Wrong Answer):
a,b=map(int,input().split())
s=input()
print(s)
if s[a]!="-":
    print("No")
    #print(1)
elif s.count("-")>1:
    print("No")
    #print(2)
else:
    s=s.replace("-","")
    #print(3)
    #print(s)
    if s.isdigit()==True:
        print("Yes")
    else:
        print("No")

Fixed, accepted submission:

a,b=map(int,input().split())
s=input()
#print(s)
if s[a]!="-":
    print("No")
    #print(1)
elif s.count("-")>1:
    print("No")
    #print(2)
else:
    s=s.replace("-","")
    #print(3)
    #print(s)
    if s.isdigit()==True:
        print("Yes")
    else:
        print("No")
Problem:
There are N + 1 squares arranged in a row, numbered 0, 1, ..., N from left to right.  Initially, you are in Square X. You can freely travel between adjacent squares. Your goal is to reach Square 0 or Square N. However, for each i = 1, 2, ..., M, there is a toll gate in Square A_i, and traveling to Square A_i incurs a cost of 1. It is guaranteed that there is no toll gate in Square 0, Square X and Square N.  Find the minimum cost incurred before reaching the goal.

Incorrect submission (verdict: Wrong Answer):
N,M,X=map(int,input().split())
A=[int(x) for x in input().split()]
left=sum(x<X for x in A)
right=M-left
print(max(left,right))


Fixed, accepted submission:
N,M,X=map(int,input().split())
A=[int(x) for x in input().split()]
ans=min(sum(x<X for x in A),sum(x>X for x in A))
print(ans)
Problem:
Iroha has a sequence of N strings S_1, S_2, ..., S_N. The length of each string is L.  She will concatenate all of the strings in some order, to produce a long string.  Among all strings that she can produce in this way, find the lexicographically smallest one.  Here, a string s=s_1s_2s_3...s_n is _lexicographically smaller_ than another string t=t_1t_2t_3...t_m if and only if one of the following holds:    * There exists an index i(1≦i≦min(n,m)), such that s_j = t_j for all indices j(1≦j<i), and s_i<t_i.   * s_i = t_i for all integers i(1≦i≦min(n,m)), and n<m.

Incorrect submission (verdict: Wrong Answer):
ans = ""

def get_input():
    flag = 1
    cnt = 0
    while True:
        try:
            if flag == 1:
                N,L = input().split()
                flag = 0
                continue
            else:
                a = input()
                yield ''.join(a)
                cnt += 1
                if cnt >= int(N):
                    break
        except EOFError:
            break

if __name__ == "__main__":
    array = list(get_input())
    array.sort()
    print(array)

    for i in range(0,len(array)):
        ans += array[i]

    print(ans)


Fixed, accepted submission:
ans = ""

def get_input():
    flag = 1
    cnt = 0
    while True:
        if flag == 1:
            N,L = input().split()
            flag = 0
            continue
        else:
            a = input()
            yield ''.join(a)
            cnt += 1
            if cnt >= int(N):
                break

if __name__ == "__main__":
    array = list(get_input())
    array.sort()

    for i in range(0,len(array)):
        ans += array[i]

    print(ans)
Problem:
Write a program which calculates the area and perimeter of a given rectangle.

Incorrect submission (verdict: Wrong Answer):
a, b = list(map(int, input().split(' ')))
print(a * b)

Fixed, accepted submission:
a, b = list(map(int, input().split(' ')))
print('{} {}'.format(a * b, 2*a + 2*b))
Problem:
A railroad running from west to east in Atcoder Kingdom is now complete.  There are N stations on the railroad, numbered 1 through N from west to east.  Tomorrow, the opening ceremony of the railroad will take place.  On this railroad, for each integer i such that 1≤i≤N-1, there will be trains that run from Station i to Station i+1 in C_i seconds. No other trains will be operated.  The first train from Station i to Station i+1 will depart Station i S_i seconds after the ceremony begins. Thereafter, there will be a train that departs Station i every F_i seconds.  Here, it is guaranteed that F_i divides S_i.  That is, for each Time t satisfying S_i≤t and t％F_i=0, there will be a train that departs Station i t seconds after the ceremony begins and arrives at Station i+1 t+C_i seconds after the ceremony begins, where A％B denotes A modulo B, and there will be no other trains.  For each i, find the earliest possible time we can reach Station N if we are at Station i when the ceremony begins, ignoring the time needed to change trains.

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

stations = []
for _ in range(n-1):
  stations.append(list(map(int, input().split())))

me = 0
for i in range(n-1):
  remain = n - i - 1
  cost = 0
  time = 0
  for r in range(remain):
    c, s, f = stations[r+i]
    if time < s:
      time = s
    else:
      if time - s < s:
        time = s*2
      else:
        time = s + ((time - s)//f)*f
    time += c
  print(time)
  
print(0)
  

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

stations = []
for _ in range(n-1):
  stations.append(list(map(int, input().split())))

me = 0
for i in range(n-1):
  remain = n - i - 1
  time = 0
  for r in range(remain):
    c, s, f = stations[r+i]
    if time < s:
      time = s
    elif time % f == 0:
      pass
    else:
      time = time + f - (time % f)
    time += c
  print(time)
  
print(0)
Problem:
You are given three integers A, B and C. Find the minimum number of operations required to make A, B and C all equal by repeatedly performing the following two kinds of operations in any order:    * Choose two among A, B and C, then increase both by 1.   * Choose one among A, B and C, then increase it by 2.  It can be proved that we can always make A, B and C all equal by repeatedly performing these operations.

Incorrect submission (verdict: Wrong Answer):
a, b, c = map(int, input().split())
m = max(a, b, c)
diff = (m-a) + (m-b) + (m-c)
print( (diff+3)//2 if diff%2 == 0 else diff//2 )

Fixed, accepted submission:
a, b, c = map(int, input().split())
m = max(a, b, c)
diff = (m-a) + (m-b) + (m-c)
print( (diff+3)//2 if diff%2 else diff//2 )
Problem:
AtCoDeer is thinking of painting an infinite two-dimensional grid in a _checked pattern of side K_. Here, a checked pattern of side K is a pattern where each square is painted black or white so that each connected component of each color is a K × K square. Below is an example of a checked pattern of side 3:    AtCoDeer has N desires. The i-th desire is represented by x_i, y_i and c_i. If c_i is `B`, it means that he wants to paint the square (x_i,y_i) black; if c_i is `W`, he wants to paint the square (x_i,y_i) white. At most how many desires can he satisfy at the same time?

Incorrect submission (verdict: Wrong Answer):
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))



N, K = lr()
table = [[0] * 2*K for _ in range(K)]
for _ in range(N):
    x, y, c = sr().split()
    x = int(x); y = int(y)
    if c == 'B':
        y -= K  
    x %= 2 * K; y %= 2 * K
    if x >= K and y >= K:
        x -= K; y -= K
    elif y >= K:
        x += K; y -= K
    
    table[y][x] += 1

table = np.array(table, dtype=np.int32)
table_cum = table.cumsum(axis=1).cumsum(axis=0)
table_cum[:, K:] -= table_cum[:, :-K]
answer = table_cum.max()
print(answer)


Fixed, accepted submission:
# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))



N, K = lr()
table = [[0] * 2*K for _ in range(K)]
for _ in range(N):
    x, y, c = sr().split()
    x = int(x); y = int(y)
    if c == 'B':
        x -= K  
    x %= 2 * K; y %= 2 * K
    if x >= K and y >= K:
        x -= K; y -= K
    elif y >= K:
        x += K; y -= K
    
    table[y][x] += 1

table = np.array(table, dtype=np.int32)
table = np.concatenate([table, table], axis=1)
table2 = np.roll(table, K, axis=1)
table = np.concatenate([table, table2], axis=0)
table_cum = table.cumsum(axis=1).cumsum(axis=0)
prev = table_cum.copy()
table_cum[:, K:] -= prev[:, :-K]
table_cum[K:, :] -= prev[:-K, :]
table_cum[K:, K:] += prev[:-K, :-K]
answer = table_cum.max()
print(answer)
Problem:
Takahashi has N balls. Initially, an integer A_i is written on the i-th ball.  He would like to rewrite the integer on some balls so that there are at most K different integers written on the N balls.  Find the minimum number of balls that Takahashi needs to rewrite the integers on them.

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

import collections
A_tuple = collections.Counter(A).most_common()[::-1]
print(len(A_tuple))
if len(A_tuple) < K:
    print(0)
else:
    ans = 0
    for i in range(len(A_tuple)-K):
        ans += A_tuple[i][1]
    print(ans)


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

import collections
A_tuple = collections.Counter(A).most_common()[::-1]

if len(A_tuple) < K:
    print(0)
else:
    ans = 0
    for i in range(len(A_tuple)-K):
        ans += A_tuple[i][1]
    print(ans)
Problem:
Write a program which reads an integer _n_ and draws a Koch curve based on recursive calles of depth _n_.  The Koch curve is well known as a kind of   You should start (0, 0), (100, 0) as the first segment.

Incorrect submission (verdict: Wrong Answer):
import math
T = []

class Vect:
    def __init__(self,x,y):
        self.x = x
        self.y = y


def hoge(p,q):
    ax = q.x-p.x
    ay = q.y-p.y
    bx = ax/5 - ay*math.sqrt(3)/2
    by = ax*math.sqrt(3)/2 + ay/2
    nb = Vect(p.x+bx,p.y+by)
    return nb

def koch(p,q,n):
    if n == 0:
        T.append(p)
    else:
        s = Vect(p.x+(q.x-p.x)/3,p.y+(q.y-p.y)/3)
        t = Vect(p.x+2*(q.x-p.x)/3, p.y+2*(q.y-p.y)/3)
        u = hoge(s,t)
        koch(p,s,n-1)
        koch(s,u,n-1)
        koch(u,t,n-1)
        koch(t,q,n-1)
        
n = int(input())

koch(Vect(0,0),Vect(100,0),n)
T.append(Vect(100,0))

for i in T:
    print("%f %f"%(i.x,i.y))
        
        

Fixed, accepted submission:
import math
T = []

class Vect:
    def __init__(self,x,y):
        self.x = x
        self.y = y


def hoge(p,q):
    ax = q.x-p.x
    ay = q.y-p.y
    bx = ax/2 - ay*math.sqrt(3)/2
    by = ax*math.sqrt(3)/2 + ay/2
    nb = Vect(p.x+bx,p.y+by)
    return nb

def koch(p,q,n):
    if n == 0:
        T.append(p)
    else:
        s = Vect(p.x+(q.x-p.x)/3,p.y+(q.y-p.y)/3)
        t = Vect(p.x+2*(q.x-p.x)/3, p.y+2*(q.y-p.y)/3)
        u = hoge(s,t)
        koch(p,s,n-1)
        koch(s,u,n-1)
        koch(u,t,n-1)
        koch(t,q,n-1)
        
n = int(input())

koch(Vect(0,0),Vect(100,0),n)
T.append(Vect(100,0))

for i in T:
    print("%.8f %.8f"%(i.x,i.y))
Problem:
Snuke lives at position x on a number line. On this line, there are two stores A and B, respectively at position a and b, that offer food for delivery.  Snuke decided to get food delivery from the closer of stores A and B. Find out which store is closer to Snuke's residence.  Here, the distance between two points s and t on a number line is represented by |s-t|.

Incorrect submission (verdict: Wrong Answer):
x,a,b = map(int, input().split())
if abs(x-a) > abs(x-b):
  print("A")
else:
  print("B")

Fixed, accepted submission:
x,a,b = map(int, input().split())
if abs(x-a) > abs(x-b):
  print("B")
else:
  print("A")
Problem:
We have a 3 \times 3 grid. A number c_{i, j} is written in the square (i, j), where (i, j) denotes the square at the i-th row from the top and the j-th column from the left.   According to Takahashi, there are six integers a_1, a_2, a_3, b_1, b_2, b_3 whose values are fixed, and the number written in the square (i, j) is equal to a_i + b_j.   Determine if he is correct.

Incorrect submission (verdict: Wrong Answer):
import numpy as np
c = np.array([[int(i) for i in input().split()] for _ in range(3)])
print(np.sum(c) % 3 == 0)

Fixed, accepted submission:
import numpy as np
c = np.array([[int(i) for i in input().split()] for _ in range(3)])
b = np.sum(c) % 3 == 0
b &= np.sum(c[0] - c[1]) % 3 == 0
b &= np.sum(c[0] - c[2]) % 3 == 0
b &= np.sum(c[1] - c[2]) % 3 == 0
c = c.T
b &= np.sum(c[0] - c[1]) % 3 == 0
b &= np.sum(c[0] - c[2]) % 3 == 0
b &= np.sum(c[1] - c[2]) % 3 == 0
print('Yes' if b else 'No')
Problem:
M-kun is a competitor in AtCoder, whose highest rating is X.   In this site, a competitor is given a _kyu_ (class) according to his/her highest rating. For ratings from 400 through 1999, the following kyus are given:    * From 400 through 599: 8-kyu   * From 600 through 799: 7-kyu   * From 800 through 999: 6-kyu   * From 1000 through 1199: 5-kyu   * From 1200 through 1399: 4-kyu   * From 1400 through 1599: 3-kyu   * From 1600 through 1799: 2-kyu   * From 1800 through 1999: 1-kyu  What kyu does M-kun have?

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

if x >= 400 and 599 >= x:
    print("8級")
elif x >= 600 and 799 >= x:
    print("7級")
elif x >= 800 and 999 >= x:
    print("6級")
elif x >= 1000 and 1199 >= x:
    print("5級")
elif x >= 1200 and 1399 >= x:
    print("4級")
elif x >= 1400 and 1599 >= x:
    print("3級")
elif x >= 1600 and 1799 >= x:
    print("2級")
elif x >= 1800 and 1999 >= x:
    print("1級")

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

if x >= 400 and 599 >= x:
    print("8")
elif x >= 600 and 799 >= x:
    print("7")
elif x >= 800 and 999 >= x:
    print("6")
elif x >= 1000 and 1199 >= x:
    print("5")
elif x >= 1200 and 1399 >= x:
    print("4")
elif x >= 1400 and 1599 >= x:
    print("3")
elif x >= 1600 and 1799 >= x:
    print("2")
elif x >= 1800 and 1999 >= x:
    print("1")
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
s=S%3600
print(str(h)+':'+str(m)+':'+str(s))

Fixed, accepted submission:
S=int(input())
h=S//3600
m=(S-h*3600)//60
s=S%60
print(str(h)+':'+str(m)+':'+str(s))