TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
N = int(input())
flg = False
count = 0
for i in range(N):
  D1,D2 =  map(int, input().split())

  if D1 == D2:
    count += 1
    if count >= 3:
      flg = True
      break
    else:
      count = 0

if flg:
  print('Yes')
else:
  print('No')

N = int(input())
flg = False
count = 0
for i in range(N):
  D1,D2 =  map(int, input().split())

  if D1 == D2:
    count += 1
    if count >= 3:
      flg = True
  else:
    count = 0

if flg:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int( input() )
#print( n )

d1 = [ 0 ] * n
d2 = [ 0 ] * n
#print( d1, d2 )

for i in range( n ):
    d1[ i ], d2[ i ] = map( int, input().split() )

#print( d1, d2 )


for i in range( n-2 ):
    if d1[ i ] == d2[ i ]:
        if d1[ i+1 ] == d2[ i+1 ]:
            if d1[ i+2 ] == d2[ i+2 ]:
                exit( "Yes" )

print( "No" )


n = int( input() )
#print( n )

cnt = 0
for i in range( n ):
    a, b = map( int, input().split() )
    if a == b:
        cnt = cnt + 1
    else:
        cnt = 0

    if cnt == 3:
        exit( "Yes" )


print( "No" )


n = int( input() )
#print( n )

cnt = 0
ans = "No"
for i in range( n ):
    a, b = map( int, input().split() )
    if a == b:
        cnt = cnt + 1
    else:
        cnt = 0

    if cnt == 3:
        ans = "Yes"


print( ans )


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int(input())

count = 0
ans = 0
for i in range(n):
    s = input().split()
    
    if s[0]==s[1]:
        count += 1
    else:
        count = 0

if ans >= 3:
    print('Yes')
else:
    print('No')

n = int(input())

count = 0
ans = 0
for i in range(n):
    s = input().split()
    
    if s[0]==s[1]:
        count += 1
    else:
        count = 0
        
    if count ==3:
        print('Yes')
        exit(0)

else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(n-3):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")


n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(int(line[0]))

for i in range(n-3):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")


n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(n-3):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("yes")
else:
  print("no")


n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(len(z)-3):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")

n = int(input())
z = []
y = o
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(n-3):
  if z[i]==z[i+1]:
    if z[i+1]==z[i+2]:
      y += 1
if y > 0:
  print("yes")
else:
  print("no")


n = int(input())
z = []
y = 0
for i in range(n):
  line = input().split(" ")
  if int(line[0])==int(line[1]):
    z.append(i)

for i in range(len(z)-2):
  if z[i]==z[i+1]-1:
    if z[i+1]==z[i+2]-1:
      y += 1
if y > 0:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
N = int(input())
count = 0
for i in range(N):
    D1, D2 = map(int, input().split())
    if D1 == D2:
        count += 1
    elif D1 != D2:
        break
if (count >= 3):
    print('Yes')
else:
    print('No')

N = int(input())
count = 0
D1_arr = []
D2_arr = []
for i in range(N):
    D1, D2 = map(int, input().split())
    D1_arr.append(D1)
    D2_arr.append(D2)
for i in range(N-2):
    if D1_arr[i] == D2_arr[i] and D1_arr[i+1] == D2_arr[i+1] and D1_arr[i+2] == D2_arr[i+2]:
        count += 1
if count >= 1:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
N = int(input())
i=0
cnt = 0
flg = 1

while i < N:
    i += 1
    a, b = map(int, input().split())
    if a==b:
        cnt += 1
    else:
        cnt = 0

if cnt >= 3:
    print("Yes")
else:
    print("No")

N = int(input())
i=0
cnt = 0
flg = 0

while i < N:
    i += 1
    a, b = map(int, input().split())
    if a == b:
        cnt += 1
        if cnt >= 3:
            flg = 1
    else:
        cnt = 0

if flg == 1:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int(input())
num_lis = [list(map(int, input().split()))]
c = 0
for i,j in num_lis:
  if c == 3:
    break
  if i == j:
    c += 1
  else:
    c = 0

if c == 3:
  print("Yes")
else:
  print("No")

n = int(input())
num_lis = [list(map(int, input().split())) for i in range(n)]
c = 0

for i,j in num_lis:
  if c == 3:
    break
  if i == j:
    c += 1
  else:
    c = 0

if c == 3:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int(input())
a = []
for i in n:
    x,y = map(int,input().split())
    a.append([x,y])
count = 0
flag = True
for x in a:
    if x[0] == x[1]:
        count += 1
        if count == 3:
            print('Yes')
            flag = False
            break
    else:
        count = 0

if flag:
    print('No')

n = int(input())
a = []
for i in n:
    x,y = map(int,input())
    a.append([x,y])
count = 0
flag = True
for x in a:
    if x[0] == x[1]:
        count += 1
        if count == 3:
            print('Yes')
            flag = False
            break
    else:
        count = 0

if flag:
    print('No')

n = int(input())
a = []
for i in range(n):
    x,y = map(int,input().split())
    a.append([x,y])
count = 0
flag = True
for x in a:
    if x[0] == x[1]:
        count += 1
        if count == 3:
            print('Yes')
            flag = False
            break
    else:
        count = 0

if flag:
    print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n=int(input())
ans=0
D=[]
for i in range(n):
  a,b=map(int, input().split())
  D.append([a,b])


for i in range(len(D)):
  if D[i][0]==D[i][1]:
    ans +=1
  else:
    if ans>0:
      ans -= 1

if ans>=3:
  print("Yes")
  
else:
  print("No")

n=int(input())
ans=0
D=[]
A=[]
for i in range(n):
  a,b=map(int, input().split())
  D.append([a,b])


for i in range(len(D)):
  if D[i][0]==D[i][1]:
    ans +=1
  else:
    if ans>0:
      ans = 0
  A.append(ans)
  
if max(A) >= 3:
  print("Yes")
  
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
#python
for _ in range(int(input())):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
if m>=3:
	print('Yes')
else:
	print('No')

for _ in range(int(input())):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
	#print(c)
if m>=3:
	print('Yes')
else:
	print('No')

for _ in range(int(input())):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
if m>=3:
	print('Yes')
else:
	print('No')

n=int(input())
m=0
c=0
for _ in range(n):
	n1,n2=map(int,input().split())
	if n1==n2:
		c+=1
		m=max(m,c)
	else:
		m=max(m,c)
		c=0
if m>=3:
	print('Yes')
else:
	print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n = int(input())

num_list=[]
count=0

for i in range(n):
    a,b = map(int, input().split())
    if a==b:
        count+=1
    if a!=b:
        if count<3:
            count=0
if count>2:
    print('YES')
else:
    print('NO')

n = int(input())

count=0

for i in range(n):
    a,b = map(int, input().split())
    if a==b:
        count+=1
    if a!=b:
        if count<3:
            count=0
if count>2:
    print('YES')
elif count<3:
    print('NO')

n = int(input())

num_list=[]

for i in range(n):
    a,b = map(str, input().split())
    num_list.append(a)
    num_list.append(b)
    s = ''.join(num_list)
if ('111' in s) or ('222' in s) or ('333' in s) or ('444' in s) or ('555' in s) or ('666' in s):
    print('YES')
else:
    print('NO')

n = int(input())

num_list=[]
count=0

for i in range(n):
    a,b = map(int, input().split())
    if a==b:
        count+=1
        if count>2:
            break
    if a!=b:
        count=0
if count>2:
    print('YES')
else:
    print('NO')

n = int(input())

count=0

for i in range(n):
    a,b = map(int, input().split())
    if a==b:
        count+=1
    if a!=b:
        if count<3:
            count=0
if count>=3:
    print('Yes')
elif count<=2:
    print('No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
N = int(input())
l = [list(map(int, input().split())) for l in range(N)]
    
for i in range(len(l)):
  if l[i][0]==l[i][1]:
    if l[i+1][0]==l[i+1][1]:
      if l[i+2][0]==l[i+2][1]:
        print('Yes')
      else:
        print('No')
    else:
      print('No')
        
  else:
    print('No')

rows = int(input())
x = []
for i in range(rows):
    x.append(list(map(int, input().split())))
    
for i in range(len(x)):
  if x[i][0]==x[i][1]:
    if [i+1][0]==[i+1][1]:
      if [i+2][0]==[i+2][1]:
        print('Yes')
      else:
        print('No')
    else:
      print('No')
        
  else:
    print('No')
    

def judge():
    cnt = 0  
 
    for _ in range(N):
        x, y = map(int, input().split())
        if x == y:
            
            cnt += 1
        else:
            
            cnt = 0
 
        if cnt == 3:
            
            return True
    
    
    return False
 
N = int(input())
 
if judge():
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
n=int(input())
count = 0
last = 0
for a in range(n):
    z = list(input().split())
    if int(z[0]) == int(z[1]):
        count+=1
        if count >= 3:
            last = 1
    if int(z[0]) != int(z[1]):
        if count > 0:
            count = 0
        else:
            continue
if last == 1:
    print("yes")
if last == 0:
    print("no")

n=int(input())
count = 0
last = 0
for a in range(n):
    z = list(input().split())
    if int(z[0]) == int(z[1]):
        count+=1
        if count >= 3:
            last = 1
    if int(z[0]) != int(z[1]):
        if count > 0:
            count = 0
        else:
            continue
if last == 1:
    print("Yes")
if last == 0:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Tak performed the following action N times: rolling two dice. The result of the i-th roll is D_{i,1} and D_{i,2}.  Check if doublets occurred at least three times in a row. Specifically, check if there exists at lease one i such that D_{i,1}=D_{i,2}, D_{i+1,1}=D_{i+1,2} and D_{i+2,1}=D_{i+2,2} hold.

Submission attempts (in order):
s = int(input())
d = [[int(v) for v in input().split()] for i in range(s)]
print(d)
ans = False
cnt = 0
for j in range(len(d)):
    if all(elem == d[j][0] for elem in d[j]):
        cnt += 1
    else:
        cnt = 0

    if cnt == 3:
        ans = True
        break
if ans:
    print ("Yes")
else:
    print("No")

s = int(input())
d = [[int(v) for v in input().split()] for i in range(s)]
ans = False
cnt = 0
for j in range(len(d)):
    if all(elem == d[j][0] for elem in d[j]):
        cnt += 1
    else:
        cnt = 0

    if cnt == 3:
        ans = True
        break
if ans:
    print ("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):

def main():
  n = int(input())
  cnt = 0
  same = 0

  for a in range(1, n):
    for b in range(a, n):
      if a * b >= n:
        break

      cnt += 1
      if a == b:
        same += 0

  print((cnt - same) * 2 + same)



main()



def main():
  n = int(input())
  cnt = 0
  same = 0

  for a in range(1, n):
    for b in range(a, n):
      if a * b >= n:
        break

      cnt += 1
      if a == b:
        same += 0

  print((cnt - same) * 2 + same)



main()



def main():
  n = int(input())
  cnt = 0
  same = 0

  for a in range(1, n):
    for b in range(a, n):
      if a * b >= n:
        break

      cnt += 1
      if a == b:
        same += 1

  print((cnt - same) * 2 + same)



main()


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
ans=0
for i in range(1,n):
    ans+=int(cnt-1)
print(ans)

import sympy

n = int(input())
ans=0
for i in range(1,n):
    ans+=int((n-1)/i)
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math
n = int(input())
ans = 0
for i in range(n):
   ans += n//(i+1)
print(ans-int(math.sqrt(n-1)))

import math
n = int(input())
ans = 0
for i in range(1,n):
   ans += (n-1)//i
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())

count = 0

for i in range(1, n//2):
    temp = n // i
    if temp * i < n:
        count += temp
    else:
        count += temp - 1

print(count + n//2)


n = int(input())

count = 0
start = n//2
if (n % 2 == 1):
    start += 1

for i in range(1, start):
    temp = n // i
    if temp * i < n:
        count += temp
    else:
        count += temp - 1

print(count + n//2)


Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
def main():
    N = input()
    ans = 0
    for c in range(1, N):
        ans += solve(N-c)
    print(ans)

def solve(n):
    res = 0
    for i in range(1,n//2):
        if n % i == 0:
            res += 1
    return res

main()

def main():
    N = int(input())
    ans = 0
    for c in range(1, N):
        ans += solve(N-c)
    print(ans)

def solve(n):
    res = 0
    for i in range(1,n//2):
        if n % i == 0:
            res += 1
    return res

main()


def main():
    N = int(input())
    ans = sum((N-1)//i for i in range(1, N))
    print(ans)

main()

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
ans = 0
for i in range(1,n):
	ans += n/i
	if n%i == 0:
		ans -= 1
print(ans)		

n = int(input())
ans = 0
for i in range(1,n):
	ans += n//i
	if n%i == 0:
		ans -= 1
print(ans)		

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math

N = int(input())

yakusu = [0] * N+1
yakusu[1] = 1
for i in range(2,N+1):
  for j in range(1,i):
    if i*j > N:
      break
    yakusu[i*j] += 2
    
  yakusu[i*i] += 1

counter = 0
for num in yakusu[1:N]:
  counter += num
      
print(counter)


  

N = int(input())

counter = 0
for i in range(1,N):
    for j in range(1,min(i, int((N-1)/i))+1):
      if i == j:
        counter += 1
      else:
        counter += 2

print(counter)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
%%time
n = int(input())

# c = N - a*b
cnt = 0
for a in range(1, n, 1):
    for b in range(1, n, 1):
        if n <= a*b:
            break
        else:
            if a != b:
                cnt += 2
            else:
                cnt += 1
                break

print(cnt)

n = int(input())

# c = N - a*b
cnt = 0
for a in range(1, n, 1):
    for b in range(1, n, 1):
        if n <= a*b:
            break
        else:
            if a != b:
                cnt += 2
            else:
                cnt += 1
                break

print(cnt)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
# coding:utf-8
n = int(input())
ans = 0

for a in range(n):
    ans += (n - 1) // a

print(ans)


# coding:utf-8
n = int(input())
ans = 0

for a in range(1, n):
    ans += (n - 1) // a

print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())
NR = int(N**0.5)
count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)


print(count)

N = int(input())

count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N/i)
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N/i)
        else:
            count += int(N/i)

count += int(N/2)
print(count)

N = int(input())
NR = int(N**0.5)
count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N-1/i)-1
        else:
            count += int(N-1/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N-1/i)-1
        else:
            count += int(N-1/i)

count += int(N/2)
print(count)


N = int(input())
 
count = 0

    for i in range(1,int(N)):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
 
 
 
print(count)

N = int(input())
NR = int(N**0.5)
count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N-1/i)-1
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N-1/i)-1
        else:
            count += int(N-1/i)

count += int(N/2)
print(count)

N = int(input())
 
count = 0
 
for i in range(1,N):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
 
 
 
print(count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
ans =0

for i in range(1,n):
    ans +=(n-1)//a
print(ans)

n = int(input())
ans =0

for i in range(1,n):
    ans +=(n-1)//i
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
k=int(input())


cnt=0
for i in range(1,k):
    for j in range(i,k+2):
        if i*j<k:
            cnt+=1
print(cnt)
        

k=int(input())


cnt=0
if k>6:
    for i in range(7,k):
        for j in range(1,k):
            
                
            if i*j<k:
                cnt+=1
            else:
                break
print(cnt+k-1+((k-1)//2)+((k-1)//3)+((k-1)//4)+((k-1)//5)+((k-1)//6))

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):

#!/usr/bin/env python
from typing import List


def input_int() -> int:
    return int(input())


def input_list_int() -> List[int]:
    return list(map(lambda x: int(x), input().split()))


def f(n: int) -> int:
    ans = 0
    for a in range(1, n - 1):
        ans += (n - 1) // a
    return ans


if __name__ == '__main__':
    n = input_int()
    print(f(n))

#!/usr/bin/env python
from typing import List


def input_int() -> int:
    return int(input())


def input_list_int() -> List[int]:
    return list(map(lambda x: int(x), input().split()))


def f(n: int) -> int:
    ans = 0
    for a in range(1, n):
        ans += (n - 1) // a
    return ans


if __name__ == '__main__':
    n = input_int()
    print(f(n))

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy
import time

import numpy as np
import numba
from numba import njit, b1, i4, i8, f8
from numba import jit


def main():
    N = int(input())
    count=0
    ans=False
    for i in range(N):
        a,b = map(int,input().split())
        if a==b:
            count += 1
        else:
            count=0
        if count >=3:
            ans=True
    print("Yes" if ans else "No")

if __name__ == '__main__':
    main()


import math
import collections
import bisect
from collections import deque
from copy import copy, deepcopy
import time

import numpy as np
import numba
from numba import njit, b1, i4, i8, f8
from numba import jit


def main():
    N = int(input())
    ans=0
    for i in range(1,N+1):
        if N%i==0:
            ans+=N//i -1
        else:
            ans+=N//i
    print(ans)

if __name__ == '__main__':
    main()

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())
NR = int(N**0.5)
count = 0
for i in range(1,int(N/2)):
    if int(N/i)-N/i == 0:
        count += int(N/i)-1
    else:
        count += int(N/i)

count += int(N/2)
print(count)

N = int(input())
NR = int(N**0.5)
count = 0
if int(N/2)-N/2 == 0:
    for i in range(1,int(N/2)):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)
else:
    for i in range(1,int(N/2)+1):
        if int(N/i)-N/i == 0:
            count += int(N/i)-1
        else:
            count += int(N/i)

count += int(N/2)
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())
ans = 0
for i in range(1,N-1):
    x = (N-1)//i
    ans += x
print(ans)

def num_divisors(prime_count):
    num = 1
    
    for prime, count in prime_count.iteritems():
        num *= (count + 1)
    
    return num
N = int(input())
ans = 1
for i in range(2,N):
    ans += um_divisors(i)
print(ans)

N = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
ans = 1
for i in range(2,N):
    a = factorization(n)
    b = 1
    for j in range(len(a)):
        x = a[j][1]
        b *= (x+1)
    ans += b
print(ans)
        

N = int(input())
ans = 0
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
for i in range(1,N):
    n = N - i
    m = len(make_divisors(n))
    ans += m
print(m)

N = int(input())
s = [0,1]
for i in range(2,N):
    for j in range(2,i**0.5+1):
        if i % j == 0:
            k = i//j
            s.apppend(2*s[k])
            break
    if len(s) != i:
        s.append(1)
print(sum(s))

N = int(input())
ans = 0
for i in range(1,N):
    x = (N-1)//i
    ans += x
print(ans)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
def prime_factorize(n):
    a = 0
    while n % 2 == 0:
        a += 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a += 1
            n //= f
        else:
            f += 2
    if n != 1:
        a += 1
    return a

n = int(input())
c = 0
for i in range(1, n):
    c += prime_factorize(i)
print(c)

n = int(input())
def num_divisor(n):
    table = [0] * (n + 1)

    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1

    return table
print(sum(num_divisor(n-1)))

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n=int(input())
count=0
for i in range(1,int(n**(1/2))):
    for j in range(i,n):
        if i*j>=n:
            break
        elif i==j:
            count+=1
        else:
            count+=2
if (int(n**(1/2)))**2==n:
    print(count)
else:
    print(count+1)

n=int(input())
count=0
for i in range(1,int(n**(1/2))+1):
    for j in range(i,n):
        if i*j>=n:
            break
        elif i==j:
            count+=1
        else:
            count+=2
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
s=0
n=int(input())-1
for i in range(n):s+=(i+1)//n
print(s)

s=0
n=int(input())-1
for i in range(n):s+=n//(i+1)
print(s)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
from operator import mul
from functools import reduce

def main():
    def factorization(n):
        l = []
        tmp = n
        for i in range(2, int(-(-tmp**0.5//1))+1):
            if tmp%i == 0:
                cnt = 0
                while tmp%i == 0:
                    cnt += 1
                    tmp //= i
                l.append(cnt+1)
                i += 1
        if tmp != 1:
            l.append(2)
        if l == []:
            if n != 1:
                l.append(2)
        if n == 1:
            l = [2]
        return l

    n = int(input())
    cnt = 0
    i = n
    for i in range(1, n):
        div = factorization(n-i)
        pattern = reduce(mul, div)
        cnt += pattern
    print(cnt) 
    
if __name__ == '__main__':
    main()


def main():
    n = int(input())
    cnt = 0
    
    for a in range(1, n):
        
        cnt += (n-1) // a
    print(cnt)

if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())
ans = 0
for a in range(N):
  ans += N//a
print(ans)

N = int(input())
ans = 0
for a in range(N):
  ans += (N//a)
print(ans)


N = int(input())
ans = 0
for a in range(1,N):
  ans += N//a
print(ans)


N = int(input())
ans = 0
for a in range(1,N):
  ans += (N-1)//a
print(ans)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
def solve():
  ans = 0
  for a in range(1, N):
    for b in range(1, N):
      x = a * b
      if x >= N:
        break
        ans += 1
        return ans

N = int(input())
ans = solve()
print(ans)


N = int(input())
ans = 0
for a in range(1, N):
    ans += (N - 1) // a
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n=int(input())
counter=0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n-i*j):
            if((i*j+k)==n):
                counter=counter+1
print(counter)

n=int(input())
counter=0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n-i*k):
            if((i*j+k)==n):
                counter=counter+1
print(counter)

n=int(input())
counter=0
for i in range(1,n+1):
    counter=counter+(n-1)//i
print(counter)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
count = 0
for a in range(1, n):
    count += (n - 0.5) // a
print(count)

n = int(input())
count = 0
for a in range(1, n):
    count += (n - 0.5) // a
print(int(count))


Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())-1
count=0
er=0
j = 0
for i in range(1, n):
  j=i
  if i*j>n:
    break
  count+=1
  j+=1

print(count)

N = int(input())
ans = 0
for a in range(1, N):
  ans += (N - 1) // a
print(ans)
    

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n=int(input())
g=lambda x:(x*(n//x)*(n//x+1))//2
print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1)))

n=int(input())
g=lambda x:(x*(n//x)*(n//x+1))//2
print(sum(g(i) for i in range(2,n+2)-sum(g(i) for i in range(1,n+1))))

n=int(input())
ans=0
for i in range(1,n):
  ans+=(n-1)//i
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):

n=int(input())
#d = [list(map(int,input().split())) for _ in range(s)]

def p(val):
    print(val)

count = 0



for i in range(1,n):
    

    

        
p(count)


n=int(input())
#d = [list(map(int,input().split())) for _ in range(s)]

def p(val):
    print(val)

count = 0



for i in range(1,n):
    count +=(n-1)//i

    

        
p(count)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
cnt = 0

for i in range(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt+n-1+n//2-1)
    

n = int(input())
cnt = 0

for i in range(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt+n-1+(n-1)//2)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math
n = int(input())
k = int(math.sqrt(n)) if n != k ** 2 else int(math.sqrt(n)) - 1
ans = 0
for i in range(1, k + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)

import math
n = int(input())
k = int(math.sqrt(n)) if n != k ** 2 else int(math.sqrt(n)) - 1
ans = 0
for i in range(1, k + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)

import math
n = int(input())
k = int(math.sqrt(n))
ans = 0
for i in range(1, k):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2 - 1
print(ans)

import math
n = int(input())
m = int(math.sqrt(n))
if n == m ** 2:
    m -= 1

ans = 0
for i in range(1, m + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
from numba import njit

@njit
def factorize1(n):
    ans=dict()
    i = 2
    while i*i<=n:
        while n%i==0:
            n=n//i
            if i in ans:
                ans[i]+=1
            else:
                ans[i]=1
        i+=1
    if n!=1:
        ans[n]=1
        
    div=1
    for j in ans.items():
        div *= j[1]+1
    return div
   
N=int(input())
ans=1
for k in range(2,N):
    ans += factorize1(k)
print(ans)

N=int(input())
ans = 0
for i in range(1,N):
    ans += (N-1)//i
print(ans)

Verdicts: Time Limit Exceeded

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
a = 1
ans = 0
 
# while a < n/2:
#     b = 2
#     while a * b < n:
#         ans += 1
#         b += 1
#     a += 1
 
# print(ans+2*(n-2)+1)

while a < n:
    if n % a == 0:
        ans += 1
    a += 1

print(ans)

n = int(input())
a = 1
ans = 0
 
# while a < n/2:
#     b = 2
#     while a * b < n:
#         ans += 1
#         b += 1
#     a += 1
 
# print(ans+2*(n-2)+1)
for i in range(1,n):
    ans += (n-1)//i

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math
N = int(input())
ans = 0
ve = math.floor(math.sqrt(N))
for st in range(ve):
    tmp = math.floor(N/(st+1)-0.000001)
    score = 2*(tmp - st)
    if score > 0:
        score -= 1
    ans += score

import math
N = int(input())
ans = 0
ve = math.floor(math.sqrt(N))
for st in range(ve):
    tmp = math.floor(N/(st+1)-0.000001)
    score = 2*(tmp - st)
    if score > 0:
        score -= 1
    ans += score
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
from functools import lru_cache
N = int(input())

count = 0
for A in range(1, N-1):
    # B <= (N - 1) // A
    count += (N - 1) // A
print(count)

from functools import lru_cache
N = int(input())

count = 0

for A in range(1, N):
    # B <= (N - 1) // A
    count += (N - 1) // A
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
from itertools import permutations
def solve(N):
    count=0
    for i in range(1,N):
        count+=(N-1)//i
    return count

# N=readInt()
# print(solve(N))

for i in range(1,101):
    print(solve(i))

def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
from itertools import permutations
def solve(N):
    return sum(find_factors(i) for i in range(1,N))

def find_factors(num):
    count=1
    i=2
    while i<=num//2:
        print(i)
        if num%i==0:
            count+=1
        i+=1
    return count
N=readInt()
print(solve(N))

def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
from itertools import permutations
def solve(N):
    count=0
    for i in range(1,N):
        count+=(N-1)//i
    return count

N=readInt()
print(solve(N))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
from sympy import divisor_count
n = int(input)
count = 0
for c in range(1, n):
    count += divisor_count(c)
print(count)


n = int(input)
count = 0
for c in range(1, n):
    count += divisor_count(c)
print(count)


n = int(input()) - 1
lst = [n // k for k in range(1, int(n**0.5+1))]
print(2 * sum(lst) - int(n**0.5)**2)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int ans = 0;
  for (int i = 0; i < N-1; i++) {
    
    for (int j = 0; j < i+1;j++){
      
      if ((i+1)%(j+1) == 0) {
        ans += 2;
        
      }
    }
  }
  
  cout <<  ans;
}


N = int(input())
ans = 0
for i in range(N-1):
    ans += (N-1)//(i+1)
    
print(ans)
  
    


Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())

k=0

for s in range(1,N):
  k = (N-1) // s
  t += k 
  
print (t)


N = int(input())

k = 0

for s in range(1,N) :
  k = (N-1) // s
  t += k 
  
print(k)

N = int(input())

k=0

for s in range(1,N):
  k += (N-1) // s
   
  
print (k)



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import math
N = int(input())

sum = 0
for i in range(1, N):
    count = 2 
    for j in range(2, int(math.floor(math.sqrt(i)))+1):
        if i % j == 0:
            if i/j == j:
                count += 1
            else:
                count += 2
    sum += count

print(sum)

import math
N = int(input())

sum = N-1 
for i in range(2, N):
    sum += (N-1)//i 

print(sum)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1) 
print(ans)

n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1) // a
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N = int(input())
ls = [0]*(N)
n = 1
while n <= N-1:
  k = 1
  tmp = 0
  while k**2 <= n:
    if n % k == 0:
      if k ** 2 = n:
        tmp += 1
      else:
        tmp += 2
  ls[n] = tmp
print(sum(ls))

N = int(input())
ans = 0
for n in range(1,N):
  ans += int((N-1)/n)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input()) - 1

j = 0

ans = 0

for i in range(1, n // 2):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1

k = 1

er = 0

while True:
    if k ** 2 > n:
        break
    er += 1
    k += 1

print((ans * 2) + er)

n = int(input()) - 1

j = 0

ans = 0

for i in range(1, n):
    
    j = i
    
    while True:
        j += 1
        if i * j > n:
            break
        ans += 1

k = 1

er = 0

while True:
    if k ** 2 > n:
        break
    er += 1
    k += 1

print((ans * 2) + er)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
n1 = n -1
print(n1 + n - 1)

n = int(input())
ans = 0
for a in range(1, n):
    ans += (n - 1) // a

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
 
for i in range(1,n):
  ans += (n-1)//i
print(ans)

n = int(input())

for i in range(1,n):
  ans += (n-1)//a
print(ans)

n = int(input())
 
ans = 0
for i in range(1,n):
  ans += (n-1)//i
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N=int(input())
count=0
for c in range(1,N):
  for a in range(1,N-c+1):
    if (N-c)%a > 0:
      count = count+1
print(count)

N=int(input())
count=0

for a in range(1,N):
    count = count + (N-1)//a
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
ans = 0
for a in range (1,n):
  for b in range (1,n):
    if n < (a * b):
        ans += 1
print(ans)

n = int(input())
ans = 0
for a in range (1,n):
    for b in range(a, n, a):
        ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
N=int(input())
ans=1
for x in range(3,N+1):
    tmp=x-1
	ans+=tmp//x
 
print(ans)

N=int(input())
ans=0
for x in range(1,N):
  ans+=(N-1)//x
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
n = int(input())
count = 0

for i in range(1,n):
  for j in range(1,n):
    if(a*b < n):
      count += 1
      
print(count)

n = int(input())
count = ((n-1) * 2) -1

for i in range(2,n):
  if(i*2 >= n):
    break
  for j in range(2,n):
    if(i*j < n):
      count += 1
    else:
      break
    
print(count)

Verdicts: Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
import numpy as np
N=int(input())
div = np.zeros(N+1, np.int64)
for n in range(1, N+1):
  for m in range(n, N+1, n):
    div[m] += 1
print(sum(div))

import numpy as np
N=int(input())
div = np.zeros(N+1, np.int64)
for n in range(1, N+1):
    for m in range(n, N+1, n):
        div[m] += 1
print(sum(div))

import numpy as np
N=int(input())
div = np.zeros(N+1, np.int64)
for n in range(1, N+1):
    for m in range(n, N+1, n):
        div[m] += 1
print(sum(div))

n = int(input())
c = 0
for i in range(1,n):
    c+=(n-1)//i
print(c)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
case_num = 0

N = int(input())

for num in range(N - 1):
  num += 1
  
  case_num += ( math.ceil(N / num) - 1 )


print(case_num)


N = int(input())

case_num += N / 2
half_num = case_num

for num in range(half_num - 1):
  num += 1
  
  case_num += ( math.ceil(N / num) - 1 )


print(case_num)

import math

case_num = 0

N = int(input())

for num in range(N - 1):
  num += 1
  
  case_num += ( math.ceil(N / num) - 1 )


print(case_num)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is a positive integer N. How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Submission attempts (in order):
from math import sqrt

# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
    # Initialize count to 0
    count_pairs = int(0)

    # count total pairs
    p = int(sqrt(N - 1))  # + 1
    q = N
    
    for i in range(1, p, 1):
        for j in range(i, q, 1):
            if i * j > N:
                break
            # print(i,j)
            count_pairs += 1
    
    # multiply by 2 to get ordered_pairs
    count_pairs *= 2

    
    # subtract redundant pairs (a, b) where a==b.
    count_pairs -= int(sqrt(N - 1))

    # return answer
    return count_pairs

    # Driver code

N = int(input())
print(countOrderedPairs(N))
# ans=prime_factorize(N)
# print(ans)


from math import sqrt

# Function to return count of Ordered pairs
# whose product are less than N
def countOrderedPairs(N):
    # Initialize count to 0
    count_pairs = int(0)

    # count total pairs
    p = int(sqrt(N - 1)) + 1
    q = N
    
    for i in range(1, p, 1):
        for j in range(i, q, 1):
            if i * j > N-1:
                break
            # print(i,j)
            count_pairs += 1
    
    # multiply by 2 to get ordered_pairs
    count_pairs *= 2

    
    # subtract redundant pairs (a, b) where a==b.
    count_pairs -= int(sqrt(N - 1))

    # return answer
    return count_pairs

    # Driver code

N = int(input())
print(countOrderedPairs(N))
# ans=prime_factorize(N)
# print(ans)

Verdicts: Wrong Answer

Accepted