TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
i = input()

if int(i)<0:
  print("0")
  return

acc = 0
for j in range(len(i)//2):
  acc+=9*(10**(2*j))

if len(i)%2==0:
  print(acc)
else:
  addition = int(i[1:])+1
  print(acc+addition)

i = input()

if int(i)<0:
 	print("0")
else:
	acc = 0
	for j in range(len(i)//2):
		acc+=9*(10**(2*j))

	if len(i)%2==0:
		print(acc)
	else:
 		addition = int(i[1:])+1
		print(acc+addition)

i = input()

acc_num = 0
for i in range(len(i)//2):
  acc+=9*(10**(2*i))

if len(i)%2==0:
  print(acc)
else:
  addition = int(i[1:])+1
  print(acc+addition)
 

i = input()

acc = 0
for j in range(len(i)//2):
  acc+=9*(10**(2*j))

if len(i)%2==0:
  print(acc)
else:

  addition = (int(i[0])-1)*10**(len(i)-1)+1
  if len(i)>1:
    addition += int(i[1:])
  print(acc+addition)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N=int(input())
if N = 10**5:
  print("90909")
elif N >= 10**4:
  resid=N-10**4+1
  print(str(9+900+resid))
elif N >= 10**3:
  print("990")
elif N >= 10**2:
  resid=N-10**2+1
  print(str(9+resid))
elif N >= 10:
  print("9")
else:
  print(str(N))

N=int(input())
if N == 10**5:
  print("90909")
elif N >= 10**4:
  resid=N-10**4+1
  print(str(9+900+resid))
elif N >= 10**3:
  print("909")
elif N >= 10**2:
  resid=N-10**2+1
  print(str(9+resid))
elif N >= 10:
  print("9")
else:
  print(str(N))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

if N <= 9
	print(N)

N = int(input())

if N < 10 :
	print(N)
elif 10 <= N <= 99 :
	print(9)
elif 100 <= N <= 999 :
	print(9 + N -99)
elif 1000 <= N <= 9999 :
	print(909)
elif 10000 <= N <= 99999 :
	print(909 + N - 9999)
elif N = 100000 :
	print(90909)

N = int(input())
s = str(len(N))
 
if s = 1 :
	print(N)
elif s = 2 :
	print(9)
elif s = 3 :
	print(9 + N -99)
elif s = 4 :
	print(909)
elif s = 5 :
	print(909 + N - 9999)
elif s = 6 :
	print(90909)

N = int(input())

if 1 <= N <= 9
	print(N)

N = int(input())
s = len(N)

if s = 1 :
	print(N)
elif s = 2 :
	print(9)
elif s = 3 :
	print(9 + N -99)
elif s = 4 :
	print(909)
elif s = 5 :
	print(909 + N - 9999)
elif s = 6 :
	print(90909)

N = int(input())
s = len(N)

if s = 1 :
	print(N)
if s = 2 :
	print(9)
if s = 3 :
	print(9 + N -99)
if s = 4 :
	print(909)
if s = 5 :
	print(909 + N - 9999)
if s = 6 :
	print(90909)

N = int(input())
s = int(len(N))

if N < 10 :
	print(N)
elif 10 <= N <= 99 :
	print(9)
elif 100 <= N <= 999 :
	print(9 + N -99)
elif 1000 <= N <= 9999 :
	print(909)
elif 10000 <= N <= 99999 :
	print(909 + N - 9999)
elif N = 100000 :
	print(90909)

N = int(input())
s = int(len(N))

if s = 1 :
	print(N)
elif s = 2 :
	print(9)
elif s = 3 :
	print(9 + N -99)
elif s = 4 :
	print(909)
elif s = 5 :
	print(909 + N - 9999)
elif s = 6 :
	print(90909)

N = int(input())
ans = len(N)

if ans = 1:
	print(N)

n = int(input())
 
if  n <= 9:
    print(n)
elif 10 <= n <= 99:
    print(9)
elif 100 <= n <= 999:
    print(n-99+9)
elif 1000 <= n <= 9999:
    print(909)
elif 10000 <= n <= 99999:
    print(n-9999+909)
elif n == 100000:
    print(90909)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = input()
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)

N = int(input())
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

if n<10:
  print(n)
elif n<100:
  print(9)
elif n<1000:
  print(n-90)
elif n<10000:
  print(909)
else n<100000:
  print(n-9090)
else:
  print(90909)

N=int(input())
NT=N
cnt=0
ans=0
while NT//10:
  cnt+=1
  NT//=10
if cnt==0:
  ans=N
if cnt==1:
  ans=9
if cnt==2:
  ans=N-90
if cnt==3:
  ans=909
if cnt==4:
  ans=909+(N-9999)
if cnt==5:
  ans=90909
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

n = int(input())
ans = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
l = len(N)
if l == 1:
  print(N)
elif l == 2:
  print(9)
elif l == 3:
  print(N-90)
elif l == 4:
  print(909)
elif l == 5:
  print(N-9090)
else:
  print(90909)

N = input()
n = int(N)
l = len(N)

if l == 1:
  print(n)
elif l == 2:
  print(9)
elif l == 3:
  print(n-90)
elif l == 4:
  print(909)
elif l == 5:
  print(n-9090)
else:
  print(90909)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import math

N = int(input())

count = 1
for i in range(1, N+1):
  if math.floor(math.log10(i)) % 2 == 0:
    count += 1
print(count)

import math
 
N = int(input())
 
count = 0
for i in range(1, N+1):
  if math.floor(math.log10(i)) % 2 == 0:
    count += 1
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

if N<10:
  print(N)
elif N<1000:
  print(9+N-99)
elif N<100000:
  print(9+900+N-9999)
elif N==100000:
  print(90909)

N=int(input())
tmp=0
if N<10:
  print(N)  
elif N<1000:
  if 9+N-99<0:
    print(9)
  else:
    print(9+N-99)
elif N<100000:
  if 9+900+N-9999<0:
    print(909)
  else:
    print(9+900+N-9999)
elif N==100000:
  print(90909)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

n = int(input())
ans = 0
for i in range(1,n + 1):
	if len(str(i)) % 2 == 1:
		ans += 1
print(ans) 

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n=int(input())
a=list(range(n))
b=0
for i in range(n):
  if len(a[i])%2==1:
    b+=1
print(b)

n=int(input())
a=list(range(n))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)


n=int(input())
a=list(range(1,n+1))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
Not found

n = int(input())
a = 0
for i in range(1,n+1):
    if len(str(i))%2 != 0:
        a += 1
print(a)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
res = 0
for i in range(1,n+1):
  if(len(i)%2):
    res+=1
print(res)

n = int(input())
res = 0
for i in range(1,n+1):
  if(len(str(i))%2):
    res+=1
print(res)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
kekka = 0
for i in range(1:N+1):
    if len(str(i)) % 2 == 1:
        kekka += 1


N = int(input())
kekka = 0
for i in range(1:N+1):
    if len(str(i)) % 2 == 1:
        kekka += 1

print(kekka)

N = int(input())
kekka = 0
for i in range(1,N+1):
    if len(str(i)) % 2 == 1:
        kekka += 1

print(kekka)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
s = 0
if n < 10:
  s += n
if n >= 10 & n < 100:
  s = 9
if n >= 100 & n < 1000:
  s = 9 + n - 100 + 1
if n >= 1000 & n < 10000:
  s = 909
if n >= 10000 & n < 100000:
  s = 909 + n - 10000 + 1
if n == 100000:
  s = 90909
print(s)

n = int(input())
s = 0
if n < 10:
  s = n
if (n >= 10) & (n < 100):
  s = 9
if (n >= 100) & (n < 1000):
  s = 9 + n - 100 + 1
if (n >= 1000) & (n < 10000):
  s = 909
if (n >= 10000) & (n < 100000):
  s = 909 + n - 10000 + 1
if n == 100000:
  s = 90909
print(s)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n=int(input())
cnt=0
J=0
for i in range(n):
  for j in range(5):
    if 10**j=<i<10**(j+1):
      J=j
      break
  if J%2==0:
    cnt+=1
print(cnt)
 
 


n=int(input())
cnt=0
J=0
for i in range(n):
  for j in range(5):
    if 10**j<=i<10**(j+1):
      J=j
      break
  if J%2==0:
    cnt+=1
print(cnt)
 
 


n=int(input())
cnt=0
for i in range(n):
  for j in range(5):
    if 10**j=<i<10**(j+1):
      J=j
      break
  if J%2==0:
    cnt+=1
print(cnt)
 
  
  

n=int(input())
cnt=0
for i in range(1,n+1):
  for j in range(6):
    if 10**j<=i<10**(j+1):
      J=j
      break
  if J%2==0:
    cnt+=1
print(cnt)
 
 


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
ans = 0
a = int(input())
for i in range(1, a+1):
  for n in str(i):
    if int(n) % 2 == 1:
      ans += 1
      break
print(ans)

ans = 0
a = int(input())
for i in range(1, a+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

print(N)

count = 0

if N == 100000 :
  count = 90909
if N >= 10000 and N <= 99999 :
  count = N - 10000 + 1 + 900 + 9
if N >= 1000 and N <= 9999 :
  count = 909
if N >= 100 and N <= 999 :
  count = N - 100 + 1 + 9
if N >= 10 and N <= 99 :
  count = 9
if N >= 1 and N <= 9 :
  count = N

print(count)


N = input()
N = int(N)

count = 0

if N == 100000 :
  count = 90909
if N >= 10000 and N <= 99999 :
  count = N - 10000 + 1 + 900 + 9
if N >= 1000 and N <= 9999 :
  count = 909
if N >= 100 and N <= 999 :
  count = N - 100 + 1 + 9
if N >= 10 and N <= 99 :
  count = 9
if N >= 1 and N <= 9 :
  count = N

print(count)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

a = 0
for i in range(1, n):
  if len(str(n)) % 2 == 1:
    a += 1
    
print(a)

n = int(input())

a = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    a += 1
    
print(a)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
ans = 0
for i in range(1,n + 1):
    print(i)
    if 10 <= i < 100 or 1000 <= i < 10000 or i == 100000:
        ans = ans
    else:
        ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
result=0
while count<=a:
	if a<=1:
		result += n+1
		break
	else:
		if count==a:
			result += n-10**count + 1
			count += 2
		else:
			if  count==0:
				result+=10
				count +=2
			else:
				result += 10**(count+1)-10**count
				count += 2
print(result-1)

import math
def main():
	n=int(input())
	a=round(math.log10(n))
	count=0
	result=0
		while count<=a:
			if a<=1:
				result += n+1
				break
			else:
			if count==a:
				result += n-10**count + 1
				count += 2
			else:
				if  count==0:
					result+=10
					count +=2
				else:
					result += 10**(count+1)-10**count
					count += 2
	aaa=result-1
	print(aaa)
main()

import math
n=int(input())
a=round(math.log10(n))
count=0
result=0
while count<=a:
	if a<=1:
		result += n+1
		break
	else:
		if count==a:
			result += n-10**count + 1
			count += 2
		else:
			if  count==0:
				result+=10
				count +=2
			else:
				result += 10**(count+1)-10**count
				count += 2
print(result-1)

        

n=int(input())
re=0
for i in range(1,n):
  if len(str(i)%2==1):
    re+=1
print(re)

import math
def main():
	n=int(input())
	a=round(math.log10(n))
	count=0
	result=0
		while count<=a:
			if a<=1:
				result += n+1
				break
			else:
			if count==a:
				result += n-10**count + 1
				count += 2
			else:
				if  count==0:
					result+=10
					count +=2
				else:
					result += 10**(count+1)-10**count
					count += 2
	aaa=result-1
	print(aaa)
main()

import math
n=int(input())
a=round(math.log10(n))
count=0
result=0
while count<=a:
	if a<=1:
		result += n+1
		break
	else:
		if count==a:
			result += n-10**count + 1
			count += 2
		else:
			if  count==0:
				result+=10
				count +=2
			else:
				result += 10**(count+1)-10**count
				count += 2
aaa=result-1
print(aaa)


import math
n=int(input())
a=round(math.log10(n))
count=0
result=0
while count<=a:
	if a<=1:
		result += n+1
		break
	else:
		if count==a:
			result += n-10**count + 1
			count += 2
		else:
			if  count==0:
				result+=10
				count +=2
			else:
				result += 10**(count+1)-10**count
				count += 2
aaa=result-1
print(aaa)

n=int(input())
re=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    re+=1
print(re)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = input('整数を入力してください：')

while n.isdigit() == False or int(n) > 10**5:
    print('Error')
    n = input('整数を入力してください：')
else:
    n = int(n)
n = int(n)

result = []
for i in range(1,n+1):
    if len(str(i)) % 2 !=0:
        result.append(i)
print(len(result))

n = int(input())

result = []
for i in range(1,n+1):
    if len(str(i)) % 2 != 0:
        result.append(i)
        
print(len(result))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
if N % 2 == 0:
    print(N / 2)
else:
    print(N // 2 + 1)

N = int(input())
number = 0
for i in range(10 ** 5):
    if len(str(i)) == 1 or len(str(i)) == 3 or len(str(i)) == 5:
        number += 1
print(number)

N = int(input())
number = 0
for i in range(1, N + 1):
    if len(str(i)) == 1 or len(str(i)) == 3 or len(str(i)) == 5:
        number += 1
print(number)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n=int(input())
if len(n)==1:
    print(n)
elif len(n)==2:
    print(9)
elif len(n)==3:
    print(n-90)
elif len(n)==4:
    print('909')
elif len(n)==5:
    print(n-9090)
else:
    print('90909')

n=input()
if len(n)==1:
    print(n)
elif len(n)==2:
    print('9')
elif len(n)==3:
    print(int(n)-90)
elif len(n)==4:
    print('909')
elif len(n)==5:
    print(int(n)-9090)
else:
    print('90909')

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
keta = len(N)
cnt = 0

for i in range(keta):
    if i % 2 == 1:
        cnt += 10**(i) - 10**(i-1)

if keta % 2 == 1:
    cnt += N - 10**(keta-1) + 1

print(cnt)

N = int(input())
keta = len(str(N))
cnt = 0

for i in range(keta):
    if i % 2 == 1:
        cnt += 10**(i) - 10**(i-1)

if keta % 2 == 1:
    cnt += N - 10**(keta-1) + 1

print(cnt)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
while True:
  print('Hello')

N = int(input())
ans = 0
for x in range(1,10):
    if N >= x:
        ans = ans + 1
for g in range(100,1000):
    if N >= g:
        ans = ans + 1
for m in range(10000,100000):
    if N >= m:
        ans = ans + 1
print(ans)

Verdicts: Time Limit Exceeded

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
print(len([1 for i in range(1,int(input())+1) if str(i)%2 == 1]))

print(len([1 for i in range(1,int(input())+1) if len(str(i))%2 == 1]))

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import numpy as np
import getpass

N = input()

array = np.arange(int(N))

n1=np.count_nonzero(array<10)
n2=np.count_nonzero((100<=array)&(array<1000))
n3=np.count_nonzero((10000<=array)&(array<100000))
ans=n1+n2+n3
print(ans)

import numpy as np

N = int(input())

array = np.arange(N)

n1=np.count_nonzero(array<10)
n2=np.count_nonzero((100<=array)&(array<1000))
n3=np.count_nonzero((10000<=array)&(array<100000))
ans=n1+n2+n3
print(ans)

import numpy as np

N = input()

array = np.arange(int(N))

n1=np.count_nonzero(array<10)
n2=np.count_nonzero((100<=array)&(array<1000))
n3=np.count_nonzero((10000<=array)&(array<100000))
ans=n1+n2+n3
print(ans)

import numpy as np

N = int(input())

array = np.arange(N)+1

n1=np.count_nonzero(array<10)
n2=np.count_nonzero((100<=array)&(array<1000))
n3=np.count_nonzero((10000<=array)&(array<100000))
ans=n1+n2+n3
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
x=str(input())
ans=0
for i in range(0,int(x)):
    if len(str(i))%2!=0:
        ans+=1
print(ans)

x=int(input())
ans=1
for i in range(1,x-1):
    if len(str(i))%2!=0:
        ans+=1
print(ans)

x=int(input())
ans=0
for i in range(1,x+1):
    if len(str(i))%2==1:
        ans+=1
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
a, b, c = map(int, input().split())
if c - (a - b) <= 0:
    print(0)
else:
    print(c - (a-b))


n = int(input())
ans = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
        ans += 1
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

ans = 0

for i in range(n):
  if 1<=i<=9:
    ans += 1
    break
  if 100<=i<=999:
    ans += 1
    break
  if 10000<=i<=99999:
    ans += 1
    break
print(ans)

n = int(input())

ans = 0

for i in range(n+1):
  
    if 1<=i<=9:
      ans += 1
      continue
    if 100<=i<=999:
      ans += 1
      continue
    if 10000<=i<=99999:
      ans += 1
      continue
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import sys
a,b,c=map(int, input().split())

if 1 <= a < 100:
    if a < 10:
        print(a)
    else:
        print(9)
elif 100 <= a < 10000:
    if a < 1000:
        print(a - 90)
    else:
        print(900 + 9)
elif 10000 <= a < 100000:
    print(a - 9999)

N=int(input())
ans=0
for i in range(1,N+1):
  dig = len(str(i))
  if dig%2 != 0:
    ans +=1
   
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
# 100000
# 1-9 9 100-999 900 10000-99999 90000
if n <= 9:
    print(n)
    exit()
if n > 9 and n <= 999:
    print(9 + n-99)
    exit()
if n > 999 and n <= 99999:
    print(9 + 900 + n-9999)
    exit()
if n > 99999 :
    print(9 + 900 + 90000)
    exit()

n = int(input())
# 100000
# 1-9 9 100-999 900 10000-99999 90000
if n <= 9:
    print(n)
    exit()
if n > 9 and n <= 999:
    print(9 + max(n-99,0))
    exit()
if n > 999 and n <= 99999:
    print(9 + 900 + max(n-9999,0))
    exit()
if n > 99999 :
    print(9 + 900 + 90000)
    exit()

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
cnt = 0
for i in range(1,n):
  if (len(str(i))%2==1)
  	cnt+=1
print(cnt)

n = int(input())
cnt = 0
for i in range(1,n+1):
  if (len(str(i))%2==1):
  	cnt+=1
print(cnt)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

for i in range(1,N):
  if len(str(i))%2=1:
    oppai +=1

print(oppai)

N =int(input())
oppai=0

for i in range(1,N+1):
  if len(str(i))%2 == 1:
    oppai +=1

print(oppai)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

def findodds(n):
  m = []
  for i in range(n):
    if len(str(i))%2!=0:
      m.append(i)
  return len(m)
print(findodds(n))

n = int(input())

def findodds(n):
  m = []
  for i in range(1, n+1):
    if len(str(i))%2!=0:
      m.append(i)
  return len(m)
print(findodds(n))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(N):
        if i < 10:
            cnt += 1
        elif 100 <= i < 1000:
            cnt += 1
        elif 10000 <= i < 100000:
            cnt += 1
                    
            
    print(cnt)
main()

import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1):
        if len(str(i))%2 == 1:
            cnt += 1
                    
    print(cnt)
main()

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n=int(input())
c=0
for i in range(n):
      if len(str(i))%2!=0:
            c+=1
print(c)

n=int(input())
c=0
for i in range(n+1):
      if len(str(i))%2!=0:
            c+=1
print(c)

n=int(input())
print(sum([i for i in range(1,n+1) if len(str(i))%2==1]))

n=int(input())
print(sum(len(str(i))%2 for i in range(1,n+1)))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

if n < 10:
    print(n)
elif n < 100:
    print("9")
elif n < 1000:
    print(n-90)
elif n < 10000:
    print("909")
elif n < 100000
    print(n-9090)
else:
    print("90909")

n = int(input())

if n < 10:
    print(n)
elif n < 100:
    print("9")
elif n < 1000:
    print(n-90)
elif n < 10000:
    print("909")
elif n < 100000:
    print(n-9090)
else:
    print("90909")

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

n = int(input())
ans = 0
for i in range(1,n+1):
  if len(str(i))%2==1:
    ans += 1
print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

ans = 0
for i range(1, n+1):
  if len(str(i))%2 == 1:
    ans += 1
print(ans)
    


n = int(input())

ans = 0
for i in range(1, n+1):
  if len(str(i))%2 == 1:
    ans += 1
print(ans)
    


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input()) 
ans = 0
for i in range(1, N+1):
    if len(str(N))%2 == 1:
        ans += 1
print(ans)

N = int(input()) 
ans = 0
for i in range(1, N+1):
    if len(str(i))%2 == 1:
        ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = input()
ans = 0
i = 1

for i in range(N):
    s = str(i+1)
    if len(s) == 1 or len(s) == 3 or len(s) == 5:
        ans += 1

N = input()
ans = 0
i = 1

for i in range(N):
    s = str(i+1)
    if len(s) == 1 or len(s) == 3 or len(s) == 5:
        ans += 1
        
print(ans)

N = int(input())
ans = 0
i = 1

for i in range(N):
    s = str(i+1)
    if len(s) == 1 or len(s) == 3 or len(s) == 5:
        ans += 1

print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = input()
answer = 0
for i in range(1, n+1):
  if len(str(i)) % 2 == 0:
    continue
  else:
    answer += 1
    
print(answer)

n = input()
answer = 0
for i in range(1, n+1):
  str(i)
  if len(i) % 2 != 0:
    answer += 1
    
print(answer)

n = input()
answer = 0
for i in range(1, n+1):
  if len(str(i)) % 2 != 0:
	answer += 1
    
print(answer)

n = int(input())
answer = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    answer += 1
print(answer)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

result = list(filter(lambda i: len(str(i)) % 2 != 0, range(1,N+1)))
print(result)


N = int(input())

result = list(filter(lambda i: len(str(i)) % 2 != 0, range(1,N+1)))
print(len(result))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
else:
    if b == 1:
        print(a)
    elif b == 3:
        d = '9' * (b // 2)
        '0'.join(d)
        d = int(d + '0')
        print(c - d)
    elif b > 3:
        d = '9' * (b // 2)
        '0'.join(d)
        d = int(d + '1')
        print(c - d)

a = input()
b = len(list(a))
c = int(a)
d = ''

if b % 2 == 0:
    d = '9' * (b // 2)
    print('0'.join(d))

else:
    if b == 1:
        print(a)
    else:
        d = '9' * (b // 2)
        d = '0'.join(d)
        d = int(d + '0')
        print(c - d)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
keta = len(str(n))
if n == 1:
  print(n)
elif n == 2:
  print(n)
elif n == 3:
  ans = 9 + n - 99
  print(ans)
elif n == 4:
  ans = 999 - 99 + 9
  print(ans)
elif n == 5:
  ans = n - 9999 + 999 - 99 + 9
elif n == 6:
  print(90909)


m = int(input())
n = len(str(m))
if n == 1:
  print(n)
elif n == 2:
  print(n)
elif n == 3:
  ans = 9 + n - 99
  print(ans)
elif n == 4:
  ans = 999 - 99 + 9
  print(ans)
elif n == 5:
  ans = n - 9999 + 999 - 99 + 9
elif n == 6:
  print(90909)


m = int(input())
n = len(str(m))
if n == 1:
  print(m)
elif n == 2:
  print(9)
elif n == 3:
  ans = 9 + m - 99
  print(ans)
elif n == 4:
  ans = 999 - 99 + 9
  print(ans)
elif n == 5:
  ans = m - 9999 + 999 - 99 + 9
  print(ans)
elif n == 6:
  print(90909)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = input()
if len(n) == 1:
  print(int(n))
elif len(n) <= 3:
  print(int(n)%100 + 10)
elif len(n) <= 5:
  print(int(n)%10000 + 1010)
else :
  print(909090)

n = int(input())
if n <= 99:
  print(min(n,9))
elif n <= 9999:
  print(min(909, n - 90))
else :
  print(min(90909, n -9090))

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

ans = 0

for i in range(N+1):
  a = str(i)
  if len(a) % 2 != 0:
    ans += 1

print(ans)


N = int(input())

ans = 0

for i in range(N):
  if len(str(i+1))/2 != 0:
    ans += 1

print(ans)


N = int(input())

ans = 0

for i in range(N+1):
  a = str(i)
  if len(a)/2 != 0:
    ans += 1

print(ans)


N = int(input())
 
ans = 0
for i in range(N):
  if len(str(i+1))%2 != 0:
    ans += 1
 
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
count = 0
for i in range(N):
  if len(str(i)) % 2 == 1:
    count += 1
print(count)


N = int(input())
count = 0
for i in range(N):
  if len(str(i+)) % 2 == 1:
    count += 1
print(count)


N = int(input())
count = 0
for i in range(N):
  if len(str(i+1)) % 2 == 1:
    count += 1
print(count)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

ans = int(0)

if n < 10:
  ans = n
elif 100 > n and n > 10:
  ans = 9
elif 1000 > n and n >= 100:
  ans = n-90
elif 10000 > n and n >= 1000:
  ans = 909
elif 100000 >= n and n >= 10000:
  ans = n-9091

n = int(input())

ans = int(0)

if n < 10:
  ans = n
if 100 > n and n >= 10:
  ans = 9
if 1000 > n and n >= 100:
  ans = n-90
if 10000 > n and n >= 1000:
  ans = 909
if 100000 > n and n >= 10000:
  ans = n-9090
if 100000 == n:
  ans = 90909

print(ans)



Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
s = str(n)
ans = 0
print(len(s))
for i in range(len(s)):
    if (i + 1) % 2 != 0:
        if len(s) == i + 1:
            ans += n - (10 ** i - 1)
        else:
            ans += 10 ** (i + 1) - 1 - (10 ** i - 1)
        print(ans)
print(ans)

n = int(input())
s = str(n)
ans = 0
for i in range(len(s)):
    if (i + 1) % 2 != 0:
        if len(s) == i + 1:
            ans += n - (10 ** i - 1)
        else:
            ans += 10 ** (i + 1) - 1 - (10 ** i - 1)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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



for i in range(1, N + 1):
    if len(str(i)) % 2 == 1:
    ans += 1

print(ans)


N = int(input())
ans = 0



for i in range(1, N + 1):

    if len(str(i)) % 2 == 1:
        ans += 1

print(ans)


Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
count=0
for i in range(1,N+1):
  if i%2 != 0:
    count+=1
print(count)

N = int(input())
count=0
for i in range(1,N+1):
  if 1 <= i <= 9:
    count+=1
  elif 100 <= i <= 999:
    count+=1
  elif 10000 <= i <= 99999:
    count+=1
print(count)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
for i in range(1, int(input())+1):
	if len(str(i))%2==1:
		print(len[i])  

n = int(input())
ans = 0
for i in range(1,n+1):
    if len(str(i))%2 != 0:
        ans += 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
cnt = 0
cnt += (n - 10 ** (len(str(n)) - 1) + 1) * (len(str(n)) % 2 == 1)
n -= n - 10 ** (len(str(n)) - 1) + 1
print(n, cnt)
if n == 0:
    print(cnt)
    exit()
for i in range(len(str(n))):
    if (len(str(n)) - i) % 2 == 1:
        cnt += 10 ** (len(str(n)) - i - 1) * 9
    print(len(str(n)) - i, cnt)
print(cnt)

n = int(input())
cnt = 0
cnt += (n - 10 ** (len(str(n)) - 1) + 1) * (len(str(n)) % 2 == 1)
n -= n - 10 ** (len(str(n)) - 1) + 1
if n == 0:
    print(cnt)
    exit()
for i in range(len(str(n))):
    if (len(str(n)) - i) % 2 == 1:
        cnt += 10 ** (len(str(n)) - i - 1) * 9
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N=int(input())
import math
if 0<=math.log10(N)<1:
  print(N)
elif 1<=math.log10(N)<2:
  print(9)
elif 2<=math.log10(N)<3:
  print(N-90)
elif 3<=math.log10(N)<4:
  print(909)
elif 4<=math.log10(N)<5:
  print(N-9090)
elif:
  print(90909)

N=int(input())
import math
if 0<=math.log10(N)<1:
  print(N)
elif 1<=math.log10(N)<2:
  print(9)
elif 2<=math.log10(N)<3:
  print(N-90)
elif 3<=math.log10(N)<4:
  print(909)
elif 4<=math.log10(N)<5:
  print(N-9090)
elif 5<=math.log10(N):
  print(90909)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

n = int(input())
ans = 0
for i in range(1,n+1):
  if len(i) % 2 != 0:
    ans += 1
print(ans)

n = int(input())
ans = 0
for i in range(1,n+1):
  num = str(i)
  if (len(num) % 2) != 0:
    ans += 1
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
c =0
for i in range(1,N+1):
  if len(str(N)) % 2 == 1:
    c+=1
print(c)

N = int(input())
c =0
for i in range(1,N+1):
  if len(str(i)) % 2 == 1:
    c+=1
print(c)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

c = 0

for i in range(6):
    if N >= 10 ** i:
        if i % 2 == 1:
            c += 9 * (10 ** (i - 1))
            print(c)
    else:
        if i % 2 == 1:
            c += N - (10 ** (i - 1)) + 1
            print(c)
        break

print(c)



N = int(input())
count = 0

for i in range(N):
    S = list(str(i + 1))
    if len(S) % 2 == 1:
        count += 1
    else:
        continue

print(count)


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
def numOfDigits(num):
    return len(str(num))
ans += 1
while n > 0:
    if numOfDigits(n)%2 == 1:
        ans += 1
print(ans)


n = int(input())
def numOfDigits(num):
    return len(str(num))
ans = 0
while n > 0:
    if numOfDigits(n)%2 == 1:
        ans += 1
    n -= 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
num = int(input())
re =0
for i in range(1,num+1):
    if len(str(i)) % 2 != 0:
        re += 1
        print(re)
        


num = int(input())
re =0
for i in range(1,num+1):
    if len(str(i)) % 2 != 0:
        re += 1
print(re)
        


Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = input()
a=0
for i in range(int(n)):
  lenn = len(range(i))
  N = lenn % 2
  if N == 0:
    a = a + 1
print(a)

n = input()
a=0
for i in range(int(n)):
  lenn = len(str(i+1))
  N = lenn % 2
  if N == 1:
    a = a + 1
print(a)

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

ans = 0
if N > 10:
  ans = ans + 9
  if N > 1000:
    ans = ans + 999 - 99
    if N >= 100000:
      ans = ans + 99999 - 9999
    else:
      ans = ans + N - 9999
  else:
    ans = ans + N - 99
else:
  ans += N
print(ans)


N = int(input())
#print(N)

ans = 0
if N > 9:
  ans = 9
  if N > 1000:
    ans = ans + 999 - 99
    if N >= 100000:
      ans = ans + 99999 - 9999
    elif N >= 10000:
      ans = ans + N - 9999
  elif N >= 100:
    ans = ans + N - 99
else:
  ans = N
print(ans)




Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
count=0
for i in range(1,n+1):
    if len(str(n))%2==1:
        count+=1
print(count)

n = int(input())

if n < 100 :
    print(n)
if 100 <= n < 10000:
    print(n-100+1+9)
if 10000 <= n < 100000:
    print(n-10000+1+999-100+1+9)
if n == 100000:
    print(90909)

n = int(input())
count=0
for i in range(1,n+1):
    if len(str(i))%2==1:
        count+=1
print(count)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int(a)
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

str = input()
num = int(str)
numbers = len(str)
print(numbers)
con = 0
a = str[-6:0]
str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers>0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

str = input()
num = int(str)
const = len(str)
numbers = len(str)
even = 0
con = 0
a = str[even:const]
b = int(a)
if numbers%2==1:
    pass
else:
    even += 1
    numbers -= 1
    a = str[even:const]
    b = int("9"*(numbers))
while numbers > 0:
    con += (b - 10**(numbers-1) + 1)
    even += 2
    numbers -= 2
    if numbers>0:
        a = str[even:const]
        b = int("9"*(numbers))
print(con)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
count = 0
for i in range(len(n)):
  if len(str(i))%2 == 1:
    count += 1
print(count)


n = int(input())
count = 0
for i in range(1,n+1):
  if len(str(i))%2 == 1:
    count += 1
print(count)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import sys

input = sys.stdin.readline


def main():
    n = input().strip()
    int_n = int(n)
    keta = len(n)
    
    
    # 1 -> 9 -> 9
    # 100 -> 999 -> 899
    # full - 100 -> x
    cnt = 0
    for i in range(1, keta + 1, 2):
        print(i)
        max_num = 10 ** (i) - 1
        min_num = 10 ** (i - 1) - 1
        cnt += max_num - min_num
        if keta == i:
            cnt -= max_num - int_n
    print(cnt)


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


def main():
    n = input().strip()
    int_n = int(n)
    keta = len(n)
    
    
    # 1 -> 9 -> 9
    # 100 -> 999 -> 899
    # full - 100 -> x
    cnt = 0
    for i in range(1, keta + 1, 2):
        max_num = 10 ** (i) - 1
        min_num = 10 ** (i - 1) - 1
        cnt += max_num - min_num
        if keta == i:
            cnt -= max_num - int_n
    print(cnt)


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==0:
        print(i)
count

N = int(input())
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==0:
        count+=1
count

N = int(input())
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==1:
        count+= 1
print(count)

N = 1000
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==0:
        print(i)
count

N = input()
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==1:
        count+= 1
print(count)

N = int(input())
import math
count = 0
for i in range(1,N+1):
    if int(math.log10(i)) %2 ==0:
        count+=1
print(count)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

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

cnt=0
for i in range(1,n+1):
  if len(str(i))%2=1:
    cnt+=1
print (cnt)

n=int(input())

cnt=0
for i in range(1,n+1):
  if len(str(i))%2==1:
    cnt+=1
print (cnt)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n = int(input())
lis = list(map(int,input().split()))
for i in range(n-1):
  if lis[i] -1 >= lis[i+1]:
    lis[i] -= 1
for i in range(n-1):
  if lis[i] > lis[i+1]:
    print("No")
    exit()
print("Yes")


n = int(input())
ans = 0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
cnt = 0
for i in range(1,N+1):
  if len(str(i))%2 != :
    cnt+=1
print(cnt)

N = int(input())
cnt = 0
for i in range(1,N+1):
  if len(str(i))%2 != 0:
    cnt+=1
print(cnt)

Verdicts: Runtime Error

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
import collections

n = int(input())
print(collections.Counter([len(str(i))%2 for i in range(n)])[1])

import collections

n = int(input())
print(collections.Counter([len(str(i))%2 for i in range(1,n+1)])[1])

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
n=int(input())
d=len(str(n))
print(d)

if d%2==0:
    print(9*10**(d//2-1))
else:
    print(9*10**(d//2-1)+n-10**(d//2+1)+1)

n=int(input())
d=len(str(n))

if d==1:
    print(n)
elif d==2 or d==3:
    c=9
    if d%2==0:
        print(c)
    else:
        print(c+n-10**(d-1)+1)
elif d==4 or d==5:
    c=909
    if d%2==0:
        print(c)
    else:
        print(c+n-10**(d-1)+1)
elif d==6:
    print("90909")

Verdicts: Wrong Answer

Accepted
Problem: Given is an integer N. Find the number of positive integers less than or equal to N that have an odd number of digits (in base ten without leading zeros).

Submission attempts (in order):
N = int(input())
keta = len(str(N))
cnt = 0
for i in range(keta):
  if i%2 == 1:
    cnt += 9*10**(i-1)

if keta%2 == 0:
  print(cnt-1)
else:
  print(cnt + N-10**(keta-1) + 1)


N = int(input())
keta = len(str(N))
cnt = 0
for i in range(keta):
  if i%2 == 1:
    cnt += 9*10**(i-1)

if keta%2 == 0:
  print(cnt)
else:
  print(cnt + N-10**(keta-1) + 1)

Verdicts: Wrong Answer

Accepted