Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;

int main(){
  
  int n;
  cin >> n;
  
  vector<int> lists(n);
  for(int i=0; i<n;i++){
    cin >> lists.at(i);
  }
  
  int ans = 1;
  int std = lists.at(0);
  
  for(int i=1;i<n;i++){
    if(lists.at(i) < std){
      ans += 1;
      std = lists.at(i);
    }
  }
  
  cout << ans << endl;
  
  return 0;
}

Fixed submission:
# abc152

n = int(input())
lists = list(map(int,input().split()))

std = lists[0]
ans = 1

for i in range(1,n):
    if lists[i] < std:
        ans += 1
        std = lists[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# abc152

n = int(input())
lists = list(map(int,input().split()))

ans = n
for i in range(n):
    if min(lists[:i+1]) != lists[i]:
        ans -= 1
print(ans)

Fixed submission:
# abc152

n = int(input())
lists = list(map(int,input().split()))

std = lists[0]
ans = 1

for i in range(1,n):
    if lists[i] < std:
        ans += 1
        std = lists[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# abc152
n = int(input())
lists = list(input().split())
num_list = list(map(int,lists))
ans = 0
for i in range(n):
    if min(num_list[:i+1]) == num_list[i]:
        ans += 1
print(ans)

Fixed submission:
# abc152

n = int(input())
lists = list(map(int,input().split()))

std = lists[0]
ans = 1

for i in range(1,n):
    if lists[i] < std:
        ans += 1
        std = lists[i]
        
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# abc152
n = int(input())
lists = list(input().split())
number_list = list(map(int,lists))
ans = 0
for i in range(n):
    ans += 1
    for j in range(i):
        if number_list[j] <= number_list[i]:
            ans -= 1
            break
                
print(ans)

Fixed submission:
# abc152

n = int(input())
lists = list(map(int,input().split()))

std = lists[0]
ans = 1

for i in range(1,n):
    if lists[i] < std:
        ans += 1
        std = lists[i]
        
print(ans)
Buggy python submission (verdict: Runtime Error):
animals = list(map(int, raw_input().split()))
S = animals[0]
W = animals[1]
if(W >= S): print('unsafe')
else: print('safe')

Fixed submission:
animals = list(map(int, raw_input().split()))
S = animals[0]
W = animals[1]
if(W >= S): print('unsafe')
else: print('safe')
Buggy python submission (verdict: Runtime Error):
pi = 3.141592
x = input()

print(x*2*pi)

Fixed submission:
import numpy as np
r = int(input())
 
print(r*2*np.pi)
Buggy python submission (verdict: Runtime Error):
N = int(input())

[int(N) for c in str(N)]

if 7 in N:
    print('Yes')
else:
    print("No")

Fixed submission:
n=input()
for c in n:
 if c=='7': #与えられた数に7が1つでも含まれていればYesを返す
   print('Yes')
   break
else: #1つも含まれていなければNoを返す
 print('No')
Buggy python submission (verdict: Runtime Error):

n = int(input())
temp = input()
h = temp.split()
for i,item in enumerate(h):
    h[i] = int(item)
dp = [0]

def rec_flog(i):
    if len(dp) > i:
        return dp[i]
    elif i >= 2:
        step1 = abs(h[i] - h[i - 1]) + rec_flog(i-1)
        step2 = abs(h[i] - h[i -2]) + rec_flog(i-2)
        dp.append(step1 if step1 <= step2 else step2)
        return dp[i]
    else :
        dp.append(h[1] - h[0])
        return dp[1]


print(rec_flog(n-1))




Fixed submission:
n, l = input().split()
n = int(n)
l = int(l)
h = [int(s) for s in input().split()]


dp = [0]
for i, height in enumerate(h):
    hight_temp = height
    step = 10000000000
    start = i - l if i - l > 0 else 0
    for k in range(start, i):
        temp_step = abs(height - h[k]) + dp[k]
        step = step if step < temp_step else temp_step
        temp = temp_step

    if i != 0:
        dp.append(step)

print(dp.pop())
Buggy python submission (verdict: Runtime Error):
n = int(input())
l= []
s = {}

for i in range(n):
  a = input()
  l.append(a)
 
s = set(l)
print(len(s)

Fixed submission:
n = int(input())

l= []
for i in range(n):
    a  = input()
    l.append(a)
s = set(l)
print(len(s))
Buggy python submission (verdict: Runtime Error):
s, w = [int(s) for s in intput().split(" ")]
if w >= s:
  print("unsafe")
else:
  print("safe")

Fixed submission:
s, w = [int(s) for s in input().split(" ")]
if w >= s:
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
if S <= W:
  print("unsafe")
else:
  print("safe")

Fixed submission:
S, W = map(int, input().split())

if S <= W:
  print("unsafe")
else:
  print("safe")

Buggy python submission (verdict: Runtime Error):
if S<W:
  print("unsafe")
else:
  print("safe")

Fixed submission:
S, W = map(int, input().split())

if S <= W:
  print("unsafe")
else:
  print("safe")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = []
count = 0
for i in range(N):
    item = input()
    if item not in S:
        S.append(item)
        count += 1
print(count)

Fixed submission:
N = int(input())
S = set()
count = 0
for i in range(N):
    S.add(input())
print(len(S))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = []
for i in range(N):
    item = input()
    if item not in S:
        S.append(item)
print(len(S))

Fixed submission:
N = int(input())
S = set()
count = 0
for i in range(N):
    S.add(input())
print(len(S))
Buggy python submission (verdict: Runtime Error):

s = raw_input()
if '7' in s:
    print('Yes')
else:
    print('No')



Fixed submission:
s = input()
if '7' in s:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):

arg = int(raw_input())

s = str(arg)
if '7' in s:
    print('Yes')
else:
    print('No')




Fixed submission:
s = input()
if '7' in s:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
seq = raw_input()

total = int(0)
for i in range(1, int(seq)+1, 1):
    if ((i % 3) != 0) and ((i % 5) != 0):
        total = total + i
print(total)


Fixed submission:
seq = int(input())

total = int(0)
for i in range(1, seq+1, 1):
    if ((i % 3) != 0) and ((i % 5) != 0):
        total = total + i
print(total)

Buggy python submission (verdict: Runtime Error):
seq = raw_input()

total = int(0)
for i in range(1, int(seq)+1, 1):
    if ((i % 3) != 0) & ((i % 5) != 0):
        total = total + i
print(total)


Fixed submission:
seq = int(input())

total = int(0)
for i in range(1, seq+1, 1):
    if ((i % 3) != 0) and ((i % 5) != 0):
        total = total + i
print(total)

Buggy python submission (verdict: Runtime Error):
seq = int(raw_input())

sum = 0
for i in range(1, seq+1, 1):
    if ((i % 3) != 0) & ((i % 5) != 0):
        sum = sum + i
print(sum)

Fixed submission:
seq = int(input())

total = int(0)
for i in range(1, seq+1, 1):
    if ((i % 3) != 0) and ((i % 5) != 0):
        total = total + i
print(total)
Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())


def gcd3(a, b, c):
    d = math.gcd(a, b)
    e = math.gcd(d, c)
    return e


ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        ans = ans + sum(list(map(lambda z: gcd3(x, y, z), range(1, K+1, 1))))

print(ans)


Fixed submission:
import math

K = int(input())

ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        ans = ans + sum(list(map(lambda z: math.gcd(math.gcd(x, y), z), range(1, K+1, 1))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())


def gcd3(a, b, c):
    d = math.gcd(a, b)
    e = math.gcd(d, c)
    return e


ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        tmp = list(map(lambda z: gcd3(x, y, z), range(1, K+1, 1)))
        ans = ans + sum(tmp)

print(ans)


Fixed submission:
import math

K = int(input())

ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        ans = ans + sum(list(map(lambda z: math.gcd(math.gcd(x, y), z), range(1, K+1, 1))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())


def gcd3(a, b, c):
    d = math.gcd(a, b)
    e = math.gcd(d, c)
    return e


ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        for z in range(1, K + 1, 1):
            ans = ans + gcd3(x, y, z)

print(ans)


Fixed submission:
import math

K = int(input())

ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        ans = ans + sum(list(map(lambda z: math.gcd(math.gcd(x, y), z), range(1, K+1, 1))))

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())


def gcd3(a, b, c):
    d = math.gcd(a, b)
    e = math.gcd(d, c)
    return e


ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        for z in range(1, K + 1, 1):
            ans = ans + gcd3(x, y, z)

print(ans)


Fixed submission:
import math

K = int(input())

ans = 0
for x in range(1, K + 1, 1):
    for y in range(1, K + 1, 1):
        ans = ans + sum(list(map(lambda z: math.gcd(math.gcd(x, y), z), range(1, K+1, 1))))

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

for n in range(N):
    print(A.count(n+1))


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

#for n in range(N):
#    print(A.count(n+1))

M = {}
for a in A:
    M[a] = M.get(a,0) + 1

for n in range(N):
    print(M.get(n+1,0))

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

for n in range(N):
    print(A.count(n+1))

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

#for n in range(N):
#    print(A.count(n+1))

M = {}
for a in A:
    M[a] = M.get(a,0) + 1

for n in range(N):
    print(M.get(n+1,0))

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split())).sort()

for n in range(N):
    print(A.count(n+1))


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

#for n in range(N):
#    print(A.count(n+1))

M = {}
for a in A:
    M[a] = M.get(a,0) + 1

for n in range(N):
    print(M.get(n+1,0))

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

for n in range(N):
    print(A.count(n+1))


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

#for n in range(N):
#    print(A.count(n+1))

M = {}
for a in A:
    M[a] = M.get(a,0) + 1

for n in range(N):
    print(M.get(n+1,0))

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

for n in range(N):
    print(A.count(n+1))

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

#for n in range(N):
#    print(A.count(n+1))

M = {}
for a in A:
    M[a] = M.get(a,0) + 1

for n in range(N):
    print(M.get(n+1,0))
Buggy python submission (verdict: Time Limit Exceeded):
import functools
import math

def euclid(a,b):
    if b ==0:
        return a
    else:
        return euclid(b, a%b)


def gcd(nums):
    return functools.reduce(math.gcd,nums)


#N = list(map(int, input().split()))

K = int(input())
SUM = 0
for a in range(K):
    a += 1
    for b in range(K):
        b += 1
        for c in range(K):
            c += 1
            NUMS = [a,b,c]
            SUM += euclid(euclid(a,b),c)
            #print("{}, {}".format(NUMS,SUM))
print("{}".format(SUM))


Fixed submission:

def euclid(a,b):
    if b ==0:
        return a
    else:
        return euclid(b, a%b)


K = int(input())
SUM = 0
for a in range(K):
    a += 1
    for b in range(K):
        b += 1
        for c in range(K):
            c += 1
            NUMS = [a,b,c]
            SUM += euclid(euclid(a,b),c)
            #print("{}, {}".format(NUMS,SUM))
print("{}".format(SUM))
Buggy python submission (verdict: Runtime Error):
import sys

args = sys.argv

priceDict = {
    "1":300000,
    "2":200000,
    "3":100000
}

totalPrice = priceDict[args[1]] if args[1] in priceDict.keys() else 0
totalPrice += priceDict[args[2]] if args[2] in priceDict.keys() else 0
totalPrice += 400000 if args[1] is "1" and args[2] is "1" else 0

print(totalPrice)


Fixed submission:
codePlace, implePlace = map(int, input().split(" "))

priceDict = {
    1:300000,
    2:200000,
    3:100000
}

totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0
totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0
totalPrice += 400000 if codePlace == 1 and implePlace == 1 else 0

print(totalPrice)
Buggy python submission (verdict: Runtime Error):
S = list(input())

count = 0
for i,s in enumerate(S):
    if i!=0:
        if S[i-1] == s:
            count += 1
            if s == "0":
                S[i] = "1"
            else:
                S[i] = "0"
            print(S)
print(count)



Fixed submission:
S = list(input())

count = 0
for i,s in enumerate(S):
    if i!=0:
        if S[i-1] == s:
            count += 1
            if s == "0":
                S[i] = "1"
            else:
                S[i] = "0"
print(count)
Buggy python submission (verdict: Runtime Error):
import math
a=int(input())
b=int(input())
c=int(input())

Fixed submission:
a,b,c=map(int,raw_input().split())
if a+b >= c:
    print "No"
else:
    q = 4 * a * b;
    h = (c - a - b) * (c - a - b)
    if q < h:
        print "Yes"
    else:
        print "No"

Buggy python submission (verdict: Runtime Error):
import math
a=int(input())
b=int(input())
c=int(input())
if math.sqrt(a) + math.sqrt(b) < math.sqrt(c):
    print "Yes"
else:
    print "No"

Fixed submission:
a,b,c=map(int,raw_input().split())
if a+b >= c:
    print "No"
else:
    q = 4 * a * b;
    h = (c - a - b) * (c - a - b)
    if q < h:
        print "Yes"
    else:
        print "No"
Buggy python submission (verdict: Time Limit Exceeded):
def gcd(a,b):
    r0=a
    r1=b
    while True:
        r2=r0%r1
        if r2==0:break
        r0=r1
        r1=r2
    return(r1)

K=int(input())
tot=0
for i in range(1,K+1):
    for j in range(1,K+1):
        tmp=gcd(i,j)
        for k in range(1,K+1):
            tot+=gcd(tmp,k)
            
print(tot)

Fixed submission:
import math
K=int(input())
tot=0
for i in range(1,K+1):
    for j in range(1,K+1):
        tmp=math.gcd(i,j)
        for k in range(1,K+1):
            tot+=math.gcd(tmp,k)
print(tot)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
ans=0
for i in range(N):
    for j in range(i+1,N):
        if S[i]!=S[j]:
            for k in range(j+1,N):
                if (j-i)!=(k-j):
                    if S[j]!=S[k] and S[i]!=S[k]:
                        ans+=1
print(ans)


Fixed submission:
N=int(input())
S=input()
r,g,b=0,0,0
for i in range(N):
    if S[i]=="R":
        r+=1
    elif S[i]=="G":
        g+=1
    elif S[i]=="B":
        b+=1
# j-i=k-j  2j-i-k=0 k=i-2j について調べるもしRGBなら、それをrgbからマイナスする
tmp=0
for i in range(N):
    for j in range(i+1,N):
        k=2*j-i
        if k<N and k>=0:
            if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
                tmp+=1
# print("rgb",r*g*b)
# print("tmp",tmp)
print(r*g*b-tmp)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
ans=0
for i in range(N):
    for j in range(i+1,N):
        for k in range(j+1,N):
            if (j-i)!=(k-j):
                if S[i]!=S[j] and S[j]!=S[k] and S[i]!=S[k]:
                    ans+=1
print(ans)


Fixed submission:
N=int(input())
S=input()
r,g,b=0,0,0
for i in range(N):
    if S[i]=="R":
        r+=1
    elif S[i]=="G":
        g+=1
    elif S[i]=="B":
        b+=1
# j-i=k-j  2j-i-k=0 k=i-2j について調べるもしRGBなら、それをrgbからマイナスする
tmp=0
for i in range(N):
    for j in range(i+1,N):
        k=2*j-i
        if k<N and k>=0:
            if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
                tmp+=1
# print("rgb",r*g*b)
# print("tmp",tmp)
print(r*g*b-tmp)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
# 15:00~
# N=4
# S="RRGB"
# j-i!=k-j
# i,j,kで文字が違う。
# print(S[1])

ans=0
for i in range(N):
    for j in range(N):
        for k in range(N):
            if (j-i)!=(k-j):
                if S[i]!=S[j] and S[j]!=S[k] and S[i]!=S[k]:
                    if i<=j and j<=k:
                        # print("i,j,k=",i,j,k,S[i],S[j],S[k])
                        ans+=1
print(ans)


Fixed submission:
N=int(input())
S=input()
r,g,b=0,0,0
for i in range(N):
    if S[i]=="R":
        r+=1
    elif S[i]=="G":
        g+=1
    elif S[i]=="B":
        b+=1
# j-i=k-j  2j-i-k=0 k=i-2j について調べるもしRGBなら、それをrgbからマイナスする
tmp=0
for i in range(N):
    for j in range(i+1,N):
        k=2*j-i
        if k<N and k>=0:
            if S[i]!=S[j] and S[i]!=S[k] and S[j]!=S[k]:
                tmp+=1
# print("rgb",r*g*b)
# print("tmp",tmp)
print(r*g*b-tmp)
Buggy python submission (verdict: Time Limit Exceeded):
N,K=(int(x) for x in input().split())
x=N
while x>K:
    x=abs(x-K)
print(min([x,abs(K-x)]))



Fixed submission:
N,K=(int(x) for x in input().split())
x=N%K
print(min([x,abs(K-x)]))
Buggy python submission (verdict: Time Limit Exceeded):
K=int(input())
N=0 #現在のルンルン数の数
i=0
while N<K:
    i+=1
    s=str(i)
    #ルンルン数のチェック
    t=0
    for j in range(len(s)-1):
        if abs(int(s[j])-int(s[j+1]))<=1:
            t+=1
        else:
            break
    if t==len(s)-1: #すべてのケタが条件を満たしていれば
        N+=1

print(i)


Fixed submission:
K=int(input())
N=0 #現在のルンルン数の数
lun=list(range(1,10))
while 1:
    N+=1
    x=lun[N-1]
    if x%10 != 0:
        lun.append(10*x+x%10-1)
    lun.append(10*x+x%10)
    if x%10 != 9:
        lun.append(10*x+x%10+1)
    if N==K:
        break
print(lun[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
a, b, c, d = map(int, input().split())
while True:
    c -= b
    if c == 0:
        print("Yes")
        break
    a -= d
    if a == 0:
        print("No")
        break


Fixed submission:
a, b, c, d = map(int, input().split())
while True:
    c -= b
    if c <= 0:
        print("Yes")
        break
    a -= d
    if a <= 0:
        print("No")
        break
Buggy python submission (verdict: Runtime Error):
HA=input()
HA=HA.split()
n=HA[0]/HA[1]
if int(HA[0])%int(HA[1])==0:
  print(n)
else:
  print(n+1)

Fixed submission:
HA=input()
HA=HA.split()
n=int(HA[0])/int(HA[1])
if int(HA[0])%int(HA[1])==0:
  print(int(n))
else:
  print(int(n+1))
Buggy python submission (verdict: Runtime Error):
H=int(input())
import math
H=int(math.log2())
print(2**(H+1))

Fixed submission:
H=int(input())
import math
H=int(math.log2(H))
print(2**(H+1)-1)

Buggy python submission (verdict: Runtime Error):
H=int(input())
import math
H=int(math.log1())
print(2**(H+1))

Fixed submission:
H=int(input())
import math
H=int(math.log2(H))
print(2**(H+1)-1)

Buggy python submission (verdict: Time Limit Exceeded):
H=int(input())
for i in range(H):
    if 2**i<=H<2**(i+1):
        print(2**(i+1)-1)

Fixed submission:
H=int(input())
import math
H=int(math.log2(H))
print(2**(H+1)-1)

Buggy python submission (verdict: Time Limit Exceeded):
H=int(input())
for i in range(H):
    if 2**i<=H<2**(i+1):
        print(2**(i+1)-1)

Fixed submission:
H=int(input())
import math
H=int(math.log2(H))
print(2**(H+1)-1)
Buggy python submission (verdict: Runtime Error):
n=input()
p=input()
p=p.split()
q=[]
for i in range(int(n)):
    if min(p[:i+1])==p[i]:
        q.append(p[i])
print(len(q))

Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=input()
p=input()
p=p.split()
q=[]
for i in range(int(n)):
    j=min(p[:i+1])
    if j==p[i]:
        q.append(p[i])
print(len(q))

Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=input()
p=input()
p=p.split()
q=[p[0]]
for i in range(int(n)):
    j=max(p[:i+1])
    if j>p[i]:
        q.append(p[i])
if p[int(n)-1]!=min(p):
    q.pop(-1)
print(len(q))

Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=input()
p=input()
p=p.split()
q=[p[0]]
for i in range(int(n)):
    j=max(p[:i+1])
    if j>p[i]:
        q.append(p[i])
if p[int(n)-1]!=min(p):
    q.pop(-1)
print(len(q))

Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
n=input()
m=input()
if int(n)==int(m):
  print('yes')
else:
  print('no')


Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
N=input('N')
M=input('M')
if int(N)==int(M):
  print('yes')
else:
  print('no')


Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
int(input())=n
int(input())=m
if n==m:
  print('yes')
else:
  print('no')


Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
int(input())=n
int(input())=m
if n=m:
  print('yes')
else:
  print('no')

Fixed submission:
a=input()
b=a.split()
if int(b[0])==int(b[1]):
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()

ans=0
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            x,y,z=s[i],s[j],s[k]
            if x!=y and y!=z and z!=x and j-i!=k-j:
                ans+=1
print(ans)

Fixed submission:
from itertools import*
n=int(input())
s=input()

*x,=accumulate(i=="R" for i in s)
*y,=accumulate(i=="G" for i in s)
*z,=accumulate(i=="B" for i in s)
x2=list(accumulate(i=="R" for i in s[::-1]))[::-1]
y2=list(accumulate(i=="G" for i in s[::-1]))[::-1]
z2=list(accumulate(i=="B" for i in s[::-1]))[::-1]

ans=0
if n<4:
    print(0)
else:
    for i in range(1,n-1):
        p=s[i]
        for j in range(1,min(i,n-i-1)+1):
            q,r=s[i-j],s[i+j]
            ans-=(p!=q and q!=r and r!=p)
                
    
    for i in range(1,n-1):
        if s[i]=="R":
            ans+=y[i-1]*z2[i+1]
            ans+=z[i-1]*y2[i+1]
        elif s[i]=="G":
            ans+=x[i-1]*z2[i+1]
            ans+=z[i-1]*x2[i+1]
        elif s[i]=="B":
            ans+=x[i-1]*y2[i+1]
            ans+=y[i-1]*x2[i+1]
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=input()

ans=0
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            x,y,z=s[i],s[j],s[k]
            if x!=y and y!=z and z!=x and j-i!=k-j:
                ans+=1
print(ans)

Fixed submission:
from itertools import*
n=int(input())
s=input()

*x,=accumulate(i=="R" for i in s)
*y,=accumulate(i=="G" for i in s)
*z,=accumulate(i=="B" for i in s)
x2=list(accumulate(i=="R" for i in s[::-1]))[::-1]
y2=list(accumulate(i=="G" for i in s[::-1]))[::-1]
z2=list(accumulate(i=="B" for i in s[::-1]))[::-1]

ans=0
if n<4:
    print(0)
else:
    for i in range(1,n-1):
        p=s[i]
        for j in range(1,min(i,n-i-1)+1):
            q,r=s[i-j],s[i+j]
            ans-=(p!=q and q!=r and r!=p)
                
    
    for i in range(1,n-1):
        if s[i]=="R":
            ans+=y[i-1]*z2[i+1]
            ans+=z[i-1]*y2[i+1]
        elif s[i]=="G":
            ans+=x[i-1]*z2[i+1]
            ans+=z[i-1]*x2[i+1]
        elif s[i]=="B":
            ans+=x[i-1]*y2[i+1]
            ans+=y[i-1]*x2[i+1]
    print(ans)