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):
import math
n = int(input())
print(math.ceil(n/2))


def get_ander_odds_digits(n):
    return [i for i in range(1, n + 1) if i % 2 == 1]

def get_number_of_odds(odd_list):
    return sum([9 * 10 ** (i - 1) for i in odd_list])

n = int(input())
number_of_digits = len(str(n))
answer = 0
if number_of_digits % 2 == 1:
    answer = n - 10 ** (number_of_digits - 1) + 1
number_of_digits -= 1

ander_odds_digits = get_ander_odds_digits(number_of_digits)
answer += get_number_of_odds(ander_odds_digits)
print(answer)

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())
if n/10 < 10:
  print(n)
  exit()
elif n/10 < 1000:
  print(n-90)
  exit()
elif n==100000:
  print(90909)
else:
  print(n-9090)
  

N = int(input())
n = len(str(N))
if n == 1:
  print(N)
elif n == 2:
  print(9)
elif n == 3:
  print(N-90)
elif n == 4:
  print(909)
elif n == 5:
  print(N-9090)
else:
  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())
count = 0

while N > 0:
    if N%10 == 0:
        count +=9
    else:
        count +=N%10
    N = N//100    
print(count)

n = int(input())

if n <10:
    count += n
elif n <100:
    count += 9
elif n <1000:
    count += n-90
elif n < 1000:
    count += 909
elif n < 10000:
    count += n-9090
elif n < 100000:
    count += 90909
else:
    count += 90910

print(count)

n = int(input())

if n <10:
    count = n
elif n <100:
    count = 9
elif n <1000:
    count = n-90
elif n < 10000:
    count = 909
elif n < 100000:
    count = n-9090
else:
    count = 90909

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())
od = len(n)
i = 0
for i in range(1,n +1):
    if od % 2 ==1:
        i += 1
print(i) 

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 = input()
l = len(n)

# print(l)
temp=''
ans=0

if l==1:
	# print(int(n))
else:
	for i in range(1,l):
		if i%2==1:
			temp='9'
			temp+='0'*(i-1)
			ans+=int(temp)
			# print(ans)

	if l%2==1:
		ans+=(int(n)-int('9'*(l-1)))

print(ans)

n = input()
l = len(n)

# print(l)
temp=''
ans=0

if l==1:
	print(int(n))
else:
	for i in range(1,l):
		if i%2==1:
			temp='9'
			temp+='0'*(i-1)
			ans+=int(temp)
			# print(ans)

	if l%2==1:
		ans+=(int(n)-int('9'*(l-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())
c=0
for r in [i+1 for in range(len(str(n))) if i%2==1]:
  for i in range(10**(r-1), min(n+1, 10**r)):
    c++n
print(c)

n = int(input())
c=0
for r in [i+1 for i in range(0, len(str(n))) if i%2==0]:
  for i in range(10**(r-1), min(n+1, 10**r)):
    c+=1
print(c)


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 = input()
if  1<=len(n)<=2:
    print(int(n))
elif 3<=len(n)<=4:
    
    print(10+int(n)-100)
elif 5<=len(n)<= 6:
    print(110)

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

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 + 1):
  if i % 2 == 0:
    continue
  else:
    count += 1
print(count)

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

N = int(input())
count = 0
for i in range(1, N+1):
  if len(str(i)) % 2 == 0:
    continue
  else:
    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):
def uneven(number):
    result = []
    for x in range(1, number + 1):
        numberOfDigits = 1
        y = x

        if(y >= 100000):
            numberOfDigits = numberOfDigits + 5
            y = y / 100000

        if(y >= 10000):
            numberOfDigits = numberOfDigits + 4
            y = y / 10000

        if(y >= 1000):
            numberOfDigits = numberOfDigits + 3
            y = y / 1000

        if(y >= 100):
            numberOfDigits = numberOfDigits + 2
            y = y / 100

        if(y >= 10):
            numberOfDigits = numberOfDigits + 1

        if (numberOfDigits % 2 != 0):
            result.append(x)

    print(len(result))

def uneven(number):
    result = []
    for x in range(1, number + 1):
        numberOfDigits = 1
        y = x

        if(y >= 100000):
            numberOfDigits = numberOfDigits + 5
            y = y / 100000

        if(y >= 10000):
            numberOfDigits = numberOfDigits + 4
            y = y / 10000

        if(y >= 1000):
            numberOfDigits = numberOfDigits + 3
            y = y / 1000

        if(y >= 100):
            numberOfDigits = numberOfDigits + 2
            y = y / 100

        if(y >= 10):
            numberOfDigits = numberOfDigits + 1

        if (numberOfDigits % 2 != 0):
            result.append(x)

    print(len(result))
    return len(result)

j = sum(1 for number in range(1, int(input()) + 1)
        if len(str(number)) % 2 != 0)

print(j)

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())
ans = 0
for i in range(0,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: 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+1):
  i = str(i)
  if len(i) % 2 == 1:
    count += 1
print(count)

N = int(input())
count = 0
for i in range(1,N+1):
  i = str(i)
  if len(i) % 2 == 1:
    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())
# 1-keta
if n<10:
  print(n)
elif n<1000:
  print(9+n-99)
elif n<100000:
  print(9+900+n-9999)
else:
  print(90909)

n=int(input())
if n<10:
  print(n)
elif n<1000:
  print(9+max(0,n-99))
elif n<100000:
  print(9+900+max(0,n-9999))
else:
  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())
count=0
for i in range(1,6):
  if N >= 10**(i):
    if i%2==1:#1,3,5 (10,1000,100000)
      count+=9*10**(i-1)
  else:
    if i%2==1:#1,3,5 (10,1000,100000)
      count+=N-10**(i-1)+1
      break
print(count)

N=int(input())
count=0
for i in range(1,6):
  if N >= 10**(i):
    if i%2==1:#1,3,5 (10,1000,100000)
      count+=9*10**(i-1)
  else:
    if i%2==1:#1,3,5 (10,1000,100000)
      count+=N-10**(i-1)+1
    break
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):
Ns = input()
N = int(Ns)
count = 0
for n in range(1, len(Ns), 2):
    count += 10 ** (n + 1) - 1
if len(Ns) % 2 == 1:
    count += N - 10 ** (len(Ns) - 1)
print(count)


Ns = input()
N = int(Ns)
count = 0

for n in range(1, len(Ns)):
    if n % 2 == 0:
        continue
    count += 10 ** n - 10 ** (n - 1)

if len(Ns) % 2 == 1:
    count += N - 10 ** (len(Ns) - 1) + 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())




list_a=np.arange(1, N+1)
list_b =[]


#print(list_a)
#print(len(str(list_a)))

for i in list_a:
    if  len(str(i))%2 !=0:
        #print(i)
        list_b.append(i)

print(len(list_b))



import numpy as np
N=int(input())




list_a=np.arange(1, N+1)
list_b =[]


#print(list_a)
#print(len(str(list_a)))

for i in list_a:
    if  len(str(i))%2 !=0:
        #print(i)
        list_b.append(i)

print(len(list_b))

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())
total = 0
for i in range(n+1):
  if (len(str(i))%2 != 0):
    total += 1
print(total)


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

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


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())
import math
if N%2==1:
    print(math.ceil(N/2))
else:
    print(N/2)

N=int(input())

if N%2==0:
    print(N//2)
    
else:
    import math
    print(math.ceil(N/2))

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

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 (n<=9):
  print(n)
  
elif (n<=999):
  print(n-90)

elif (n<=99999):
  print(n-9090)
  
else:
  print(90909)

n=int(input())

if (n<=9):
  print(n)

elif (n<=99):
  print(9)

elif (n<=999):
  print(n-90)

elif (n<=9999):
  print(909)
  
elif (n<=99999):
  print(n-9090)
  
else:
  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(str(n))%2==1:ans+=1
print(ans)

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

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=int(input())
b=0
for i in range(1,a+1):
  if len(i)%2==1:
    b+=1
print(b)

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

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):
    s = str(i)
    s_set = set(list(s))
    if len(s_set) % 2 == 1:
        count += 1
print(count)

def main():

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

    return ans

if __name__ == '__main__':
    print(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())
res = 0
for i in range(n + 1):
    if len(str(i)) % 2 == 1:
        res += 1
print(res)

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

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

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

Verdicts: 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(0,5,2):
  if n>=10**(i+1):
    cnt+=9*(10**i)
  else:
    cnt+=n-(10**i)+1
    break
    
print(cnt)    
  


n=int(input())
k=1
cnt=0

while n>=10**(k-1):
  if n>=10**k:
    cnt+=9*(10*(k-1))
    k+=2
  else:
    cnt+=n-10**(k-1)+1
    
print(cnt)    
  

n=int(input())
cnt=0

for i in range(0,5,2):
  if n>=10**(i+1):
    cnt+=9*(10*(i))
  else:
    cnt+=n-10**(i)+1
    break
    
print(cnt)    
  


n=int(input())
cnt=0
x=0
 
for i in range(0,5,2):
    if n>=10**(i+1):
        cnt+=9*(10**i)
    else:
        if n>=10**(i):
            cnt+=n-(10**i)+1
        else:
            x+=1
    
print(cnt) 

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):
if len(str(n)) == 6:
    print(90909)
elif len(str(n)) == 4:
    print(909)
elif len(str(n)) == 2:
    print(9)
elif len(str(n)) == 1:
    print(n)
elif len(str(n)) == 3:
    print(9 + (n - 100) + 1)
elif len(str(n)) == 5:
    print(9 + 900 + (n - 10000) + 1)


n = int(input())

if len(str(n)) == 6:
    print(90909)
elif len(str(n)) == 4:
    print(909)
elif len(str(n)) == 2:
    print(9)
elif len(str(n)) == 1:
    print(n)
elif len(str(n)) == 3:
    print(9 + (n - 100) + 1)
elif len(str(n)) == 5:
    print(9 + 900 + (n - 10000) + 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):
def main():
    N = int(input())
    i = 0
    while N >0:
        if len(N) % 2 != 0:
            i+=1
        N -= 1
    print(i)
main()

def main():
    N = int(input())
    i = 0
    while N >0:
        n = int(str(N)[-1])
        if n % 2 != 0:
            i+=1
        N -= 1
    print(i)
main()

def main():
    N = input()
    i = 0
    while int(N) >0:
        if len(N) % 2 != 0:
            i+=1
        N = int(N) -1
        N = str(N)
    print(i)
main()

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):
n = int(input())
ans = 0

for i in range (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: 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_s = input()
N = int(N_s)
ans = 0
for i in range(1, len(N_s)):
	if i % 2 == 1:
    	ans += (10**i - 10**(i - 1))
if len(N_s) % 2 == 1:
  	ans += (1 - 10**(len(N_s)) + N)
print(ans)


N = int(input())
if N >= 100000:
  	print(90909)
else if N >= 10000:
  	print(909 + (N - 10000))
else if N >= 1000:
  	print(909)
else if N >= 100:
  	print(9 + (N - 100))
else if N >= 10:
  	print(9)
else:
  	print(N)

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

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


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


N = input()
n = int(N)
if N >= 100000:
  	print(90909)
else if N >= 10000:
  	print(909 + (N - 10000))
else if N >= 1000:
  	print(909)
else if N >= 100:
  	print(9 + (N - 100))
else if N >= 10:
  	print(9)
else:
  	print(N)


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

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)

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())
cnt = 0
for i in range(1, n + 1):
  if len(str(i)) % 2 == 1:
    cnt +=1
print(cnt)


Verdicts: Runtime Error

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=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())

result = 0
if len(str(N)) % 2 == 0:
    loop = ((len(str(N)) - 1) -1) //2 + 1
    print(loop)
    for i in range(loop):
        result += 9 * pow(10,2*i)
else:
    for i in range(len(str(N)) - 2):
        result += 9 * pow(10,i)
    result += N - pow(10,len(str(N)) - 1) + 1

print(result)


result = 0
if(0<N<=pow(10,5)):
    if len(str(N)) % 2 == 0:
        loop = ((len(str(N)) - 1) -1) //2 + 1
        for i in range(loop):
            result += 9 * pow(10,2*i)
    else:
        for i in range(len(str(N)) - 2):
            result += 9 * pow(10,i)
        result += N - pow(10,len(str(N)) - 1) + 1

print(result)

N = int(input())

result = 0
if(0<N<=pow(10,5))
    if len(str(N)) % 2 == 0:
        loop = ((len(str(N)) - 1) -1) //2 + 1
        for i in range(loop):
            result += 9 * pow(10,2*i)
    else:
        for i in range(len(str(N)) - 2):
            result += 9 * pow(10,i)
        result += N - pow(10,len(str(N)) - 1) + 1

print(result)

N = int(input())

print(sum(len(str(i)) % 2 for i in range(1,N+1)))

Verdicts: Wrong Answer

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):
def main:
  s=0
  N=int(input())
  for i in range(1,N+1):
    if (len(str(i)))%2!=0:
      s+=1
  print(s)
  

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

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

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

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())
dig=len(str(N))
digr=dig-(dig%2)-2
intr=sum([10**i for i in range(0, digr+1,2)])*9
if (dig % 2):
    intr=intr+N-10**(dig-1)+1

print(intr+ad)


N=int(input())
dig=len(str(N))
digr=dig-(dig%2)-2
intr=sum([10**i for i in range(0, digr+1,2)])*9
if (dig % 2):
    intr=intr+N-10**(dig-1)+1

print(intr)

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(map(int,input().split()))
#b=list(map(int,input().split()))
#s=[input() for _ in range(n)]
n=list(input())
m=len(n)
a="".join(n[:])
a=int(a)
ans=0
for i in range(0,m-2,2):
        ans+=9*(10**i)
if m%2==1:
         ans+=a-10**(m-1)+1
print(ans)



n=int(input())
#A=list(map(int,input().split()))
#b=list(map(int,input().split()))
#s=[input() for _ in range(n)]
ans=0
for i in range(1,n+1):
        if len(str(i))=1:
                ans+=1
print(ans)



n=int(input())
#A=list(map(int,input().split()))
#b=list(map(int,input().split()))
#s=[input() for _ in range(n)]
ans=0
for i in range(1,n+1):
        if len(str(i))%2==1:
                ans+=1
print(ans)



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 = 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 = int(input())
if 0<N<10:
  num = N

if 10=<N<100:
  num = 9

if 100=<N<1000:
  num = 9 + N - 99
  
if 1000=<N<10000:
  num = 9 + 900

if 10000=<N<100000:
  num = 909 + N - 9999

if N==100000:
  num=909+90000
  
print(num)

N = int(input())
if 0<N<10:
  num = N
 
if 10<=N<100:
  num = 9
 
if 100<=N<1000:
  num = 9 + N - 99
  
if 1000<=N<10000:
  num = 9 + 900
 
if 10000<=N<100000:
  num = 909 + N - 9999
 
if N==100000:
  num=909+90000
  
print(num)

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):
count = 0
for i in range(1,n+1):
    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):
ans=0
for i in range(1,n+1):
  if len(str(i))%2:
    ans+=1
print(ans)

ans=0
for i in range(1,int(input())+1):
  if len(str(i))%2:
    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())
m == 0
for i in range(n):
  if len(str(i))%2 != 0:
    m += 1
print(m)

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

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

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):
a = int(input())
b = 0
for i in a:
    if a[i] % 2 == 1:
        b += 1
print(b)

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

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())

c = 0
t = n
while t // 10 != 0:
    c += 1
    t = t // 10

print(c)

ans = 0
if c == 0:
    ans = n
elif c == 1:
    ans = 9
elif c == 2:
    ans = n - 99 + 9
elif c == 3:
    ans = 909
elif c == 4:
    ans = n - 9999 + 909
else:
    ans = 90909

print(ans)

n = int(input())

c = 0
t = n
while t // 10 != 0:
    c += 1
    t = t // 10

ans = 0
if c == 0:
    ans = n
elif c == 1:
    ans = 9
elif c == 2:
    ans = n - 99 + 9
elif c == 3:
    ans = 909
elif c == 4:
    ans = n - 9999 + 909
else:
    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())

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

n = int(input())

count = 0
for i in range(1, n + 1):
  i = str(i)
  if len(i) % 2 == 1:
    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())
ans=0
for i in range(n):
    if len(list(n))%2==1:
        ans=ans+1
        
print(ans)


n=int(input())
ans=0
for i in range(n+1):
    if len(str(i))%2==1:
        ans=ans+1
        
print(ans-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):
n = int(input())
h = list(map(int,input().split()))
f = 0

for i in range(1,n):
    a = h[i-1] - h[i]
    if a > 1:
        break
    elif a == 1:
        if f == 1:
            break
        f = 1
    else:
        f = 0

    if i == n - 1:
        f = 2

if f == 2 or n == 1:
    print('Yes')
else:
    print('No')

n = int(input())

cnt = 0

for i in range(1,n+1):
    ln = len(str(i))
    if ln % 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):
import os,re
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations
from sys import stdin,setrecursionlimit
from copy import deepcopy
import pysnooper
setrecursionlimit(10**6)

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

import os,re
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations
from sys import stdin,setrecursionlimit
from copy import deepcopy
setrecursionlimit(10**6)

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())
result=0
if N>=10:
    result=9
else:
    result=N

if N>=1000:
    result+=899
elif 100<=N and N<1000:
    result+=N-100+1

if N>=100000:
    result+=89999
elif 10000<=N and N<100000:
    result+=N-10000+1

print(N)

N=int(input())

if N>=10:
    result=9
elif N<10:
    result=N

if N>=1000:
    result+=900
elif 100<=N and N<1000:
    result+=N-100+1

if N>=100000:
    result+=90000
elif 10000<=N and N<100000:
    result+=N-10000+1

print(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):
# -*- coding: utf-8 -*-

n = int(input())
keta = int(len(str(n)))
c = 0

print("keta",keta)

if keta ==1:
    print(n)
elif keta ==2:
    print(9)
elif keta ==3:
    print(9+n-10**2+1)
elif keta == 4:
    print(900+9)
elif keta == 5:
    print(9+900+n-10**4+1)
elif keta == 6:
    print(9+900+90000)

# -*- coding: utf-8 -*-

n = int(input())
keta = int(len(str(n)))
c = 0



if keta ==1:
    print(n)
elif keta ==2:
    print(9)
elif keta ==3:
    print(9+n-10**2+1)
elif keta == 4:
    print(900+9)
elif keta == 5:
    print(9+900+n-10**4+1)
elif keta == 6:
    print(9+900+90000)

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

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 = int(input())
count = 0
for i in range(n):
  if len(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:
    prnt(9)
elif N<1000:
    print(N-90)
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):
#ACB-136-B1

N = int(input())

str_N= str(N)

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

#ACB-136-B1

N = int(input())

str_N= str(N)

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

#ACB-136-B1

N = int(input())

str_N= str(N)
ans = 0
for i in range(1,N+1):
	if len(str(i)) % 2 ==1:
		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())
lg = len(N)
cnt = 0
if lg == 6:
    cnt = 90909
elif lg == 5:
    cnt += N - 10000 + 1
    cnt += 909
elif lg == 4:
    cnt = 909
elif lg == 3:
    cnt += N - 100 + 1
    cnt += 9
elif lg == 2:
    cnt = 9
else:
    cnt = N
print(cnt)

N = int(input())
lg = len(N)
cnt = 0
if lg == 6:
    cnt = 90900
elif lg == 5:
    cnt += N - 10000 + 1
    cnt += 909
elif lg == 4:
    cnt = 909
elif lg == 3:
    cnt += N - 100 + 1
    cnt += 9
elif lg == 2:
    cnt = 9
else:
    cnt = N
print(cnt)

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


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()
cnt = 0
for i in range(1,n+1):
  a = len(i)
  if a % 2 == 1:
    cnt += 1
print(cnt)

n = int(input())
cnt = 0
for i in range(1,n+1):
  a = len(str(i))
  if a % 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 = input()
s = int(n)
l = len(n)
if l == 1 or l == 2:
    print(s)
if l == 3:
    print(9+s-99)
if l == 4:
    print(909)
if l == 5:
    print(9+900+s-9999)
if l == 6:
    print(90909)

n = input()
s = int(n)
l = len(n)
if l == 1:
    print(s)
if l == 2:
    print(9)
if l == 3:
    print(9+s-99)
if l == 4:
    print(909)
if l == 5:
    print(9+900+s-9999)
if l == 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())
cnt = 0
for i in range(1,n+1):
  if len(str(n))%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: 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=n
if n>99: ans=n-90
if n>9999: ans=n-9000-90
if n>99999: ans=90909
print(ans)

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

n=int(input())
ans=0
ans+=n%10
ans+=n%1000+1
ans+=n%100000+1
print(ans)

n=int(input())
ans=0
if n>=99999 :ans+=n%100000+1+900+9
elif n>=999 :ans+=n%1000+1+9
elif n>=9 :ans+=n%10
print(ans)

n=str(input())
ans=0
ans+=n%10
ans+=n%1000+1
ans+=n%100000+1

n=str(input())
ans=0
ans+=n%10
ans+=n%1000+1
ans+=n%100000+1
print(ans)

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

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):
a=int(input())
b=0
for i in range(a):
  if len(str(a))%2!=0:
    b+=1
  
print(b)

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


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())
h=list(map(int,input().split()))
ans="Yes"
for i in range(n-1):
    m=min(h[i+1:n])
    if h[i]-m>1:
        ans="No"
        break
print(ans)

n=int(input())
t=n
c=1
while t>=10:
    t=t//10
    c=c+1
ans=0
for i in range(1,c):
    if i%2==1:
        ans+=10**(i)-10**(i-1)
if c%2==1:
    ans=ans+n+1-10**(c-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())
if n < 10:
  print(n)
elif n < 1000:
  print(n-90)
elif n == 100000:
  print(n-9091)
else:
  print(n-9090)

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-9091)
else:
  print(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())
f = len(str(N))
print(f)
if f%2 == 0:
  print((100**(f//2)-1)//11)
else:
  print((100**((f-1)//2)-1)//11 + N - 10**(f-1) + 1)


N = int(input())
f = len(str(N))
if f%2 == 0:
  print((100**(f//2)-1)//11)
else:
  print((100**((f-1)//2)-1)//11 + N - 10**(f-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):
# -*- coding: utf-8 -*-


if __name__ == '__main__':
    n = int(input())
    num = 0
    for i in range(n):
        if len(str(i)) % 2 == 1:
            num += 1
    print(num)


# -*- coding: utf-8 -*-


if __name__ == '__main__':
    n = int(input())
    num = 0
    for i in range(n):
        if len(str(i+1)) % 2 == 1:
            num += 1
    print(num)


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):
#

#

from math import prod

if __name__ == '__main__':
    n = int(input())
    for i in range(n, 1, -1):
        c = str(i)
        if i%2 == 1 and not '0' in c:
            print(i)
            break



#

#

from math import prod

if __name__ == '__main__':
    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())

cnt = 0
i = 0
for i in range(0, 5, 2):
  m = 10 ** i
  print(m)
  if len(str(m)) > len(str(N)):
    break
  M = int("9" * (i + 1))
  print(M)
  
  if M > N:
    M = N
  print(M)
  
  cnt += M - m + 1

print(cnt)

N = int(input())

cnt = 0
i = 0
for i in range(0, 5, 2):
  m = 10 ** i
  if len(str(m)) > len(str(N)):
    break
  M = int("9" * (i + 1))
  
  if M > N:
    M = N
  
  cnt += M - m + 1

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):
a=int(input())
if a<10:
  print(a)
if 10<=a<1000:
  print(9+a-90)
if 1000<=a<100000:
  print(9+900+a-9090)
if a==1000000:
  print(90909)

a=int(input())
if a<10:
  print(a)
if 10<=a<100:
  print(9)
if 100<=a<1000:
  print(9+a-99)
if 1000<=a<10000:
  print(909)
if 10000<=a<100000:
  print(909+a-9999)
if a==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 = input()

cnt=0

for i in range(1,N+1):
    if len(str(i)) %2 != 0:
        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):
N = int(input())
s = N
l = len(str(s))
ans = 0
for i in range(l):
    print(l - i - 1)
    if (l - i) % 2 == 1:
        ans += N - 10 ** (l - i - 1)
    N = 10 ** (l - i - 1)
    print(N)
if l % 2 == 1:
    print(ans + 1)
else:
    print(ans)

N = int(input())
s = N
l = len(str(s))
ans = 0
for i in range(l):
    if (l - i) % 2 == 1:
        ans += N - 10 ** (l - i - 1)
    N = 10 ** (l - i - 1)
if l % 2 == 1:
    print(ans + 1)
else:
    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 N:
  if len(list(i)) % 2 == 1:
    ans += 1
print(ans)

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

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

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

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):
# coding: utf-8
n = input()
cnt = 0
for i in range(1, int(n) + 1):
    if len(str(i)) % 2 == 1:
        print(i)
        cnt += 1

print(cnt)

# coding: utf-8
n = input()
cnt = 0
for i in range(1, int(n) + 1):
    if len(str(i)) % 2 == 1:
        cnt += 1

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())
num = 0
print(len(str(n)))
for i in range(n):
  if len(str(i))%2 == 1:
    num += 1
print(num)

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

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

n = int(input())

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

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

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

Verdicts: Wrong Answer

Wrong Answer

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())

def keta(N):
    ten = 1
    for i in range(1, 8):
        if N/ten < 1:
            break
        ten = ten*10
    return i-1
        
if keta(N)==1:
    ans = N
elif keta(N)==2:
    ans = 9
elif keta(N)==3:
    ans = 9 + N-99
elif keta(N)==4:
    ans = 909
elif keta(N)==5:
    ans = 1009 + N-9999
elif keta(N)==6:
    ans = 90909

print(keta(N))
print(ans)

N = int(input())

def keta(N):
    ten = 1
    for i in range(1, 8):
        if N/ten < 1:
            break
        ten = ten*10
    return i-1
        
if keta(N)==1:
    ans = N
elif keta(N)==2:
    ans = 9
elif keta(N)==3:
    ans = 9 + N-99
elif keta(N)==4:
    ans = 909
elif keta(N)==5:
    ans = 909 + N-9999
elif keta(N)==6:
    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())
cou = 0
for i in range(n, 1):
    num = len(str(i))
    if not num%2:
        cou+=1
print (cou)

# -*- coding: utf-8 -*-
n = int(input())
cou = 0
for i in range(n, 1):
    if not i%2:
        cou+=1
print (cou)

# -*- coding: utf-8 -*-
n = int(input())
cou = 0
for i in range(n+1):
    if not i%2:
        cou+=1
print (cou)

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

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())
ans
if n<10:
  print(n)
if 9<n<100:
  print(9)
if 99<n<1000:
  print(n-90)
if 999<n<10000:
  print(909)
if 9999<n:
  print(n-9090)


n=int(input())
if n<10:
  print(n)
if 9<n<100:
  print(9)
if 99<n<1000:
  print(n-90)
if 999<n<10000:
  print(909)
if 9999<n<100000:
  print(n-9090)
if n==100000:
  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())

# 1 <= N <= 10**5 = 100,000

if N <= 9:
  print(N)
elif N <= 999:
  ans = 9 + (N - 99)
  print(ans)
elif N <= 99999:
  ans = 9 + 900 + (N - 9999)
  print(ans)
else:
  print(90909

N = int(input())

# 1 <= N <= 10**5 = 100,000

if N <= 9:
  print(N)
elif N <= 999:
  ans = 9 + (N - 99)
  print(ans)
elif N <= 99999:
  ans = 9 + 900 + (N - 9999)
  print(ans)
else:
  print(90909)

N = int(input())

# 1 <= N <= 10**5 = 100,000

if N <= 99:
  print(min(N, 9))
elif N <= 9999:
  ans = 9 + (min(N, 999) - 99)
  print(ans)
else:
  ans = 9 + 900 + (min(N, 99999) - 9999)
  print(ans)

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):

N = input()

ans = 0

if len(N) == 1:
    ans = int(N)

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

        dataS = N[i-1]

        if i == 1:
            ans = ans + 9

        elif i % 2 == 1:

            if i == len(N):
                data1 = (int(N[len(N) - i]) - 1) 
                data2 = int(N[-(len(N)-1):]) + 1

                ans = ans + data1 + data2

            else:
                ans = ans + 9 * 10**(i-1)


N = input()

ans = 0

if len(N) == 1:
    ans = int(N)

else:
    for i in range(1, len(N) + 1, 2):

        dataS = N[i-1]

        if i == 1:
            ans = ans + 9

        elif i % 2 == 1:

            if i == len(N):
                data1 = (int(N[len(N) - i]) - 1)
                data2 = int(N[-(len(N)-1):]) + 1

                ans = ans + data1 *10**(i-1) + data2

            else:
                ans = ans + 9 * 10**(i-1)
            
print(str(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 numpy as np

N = int(input)

digit = int(np.log10(N).round()+1)
cnt = 0

for x in range(digit):
    x += 1
    if x % 2 != 0:
        if x < digit:
            cnt += (10**x) - (10**(x-1))
        else:
            cnt += N - (10**(x-1)) + 1
print('{}'.format(cnt))

N = int(input())
# %%

digit = len(str(N))
cnt = 0

for x in range(digit):
    x += 1
    if x % 2 != 0:
        if x < digit:
            cnt += (10**x) - (10**(x-1))
        else:
            cnt += N - (10**(x-1)) + 1

print('{}'.format(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 = input()
nlen = len(N)
cnt = 0
for i in range(1, nlen):
  if i % 2:
    cnt += (10 ** i) - (10 ** (i - 1))
print(cnt)
N = int(N)
if nlen % 2:
  cnt += N - 10 ** (nlen - 1) + 1
print(cnt)

N = input()
nlen = len(N)
cnt = 0
for i in range(1, nlen):
  if i % 2:
    cnt += (10 ** i) - (10 ** (i - 1))
N = int(N)
if nlen % 2:
  cnt += N - 10 ** (nlen - 1) + 1
print(cnt)

Verdicts: Wrong Answer

Accepted