Problem:


Score : 200 points

Problem Statement

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

Constraints

1 \leq N \leq 10^5

Input

Input is given from Standard Input in the following format:

N

Output

Print the number of positive integers less than or equal to N that have an odd number of digits.

Sample Input 1

11

Sample Output 1

9

Among the positive integers less than or equal to 11, nine integers have an odd number of digits: 1, 2, \ldots, 9.

Sample Input 2

136

Sample Output 2

46

In addition to 1, 2, \ldots, 9, another 37 integers also have an odd number of digits: 100, 101, \ldots, 136.

Sample Input 3

100000

Sample Output 3

90909



Sample input:
11


Sample output:
9

Submission status: Runtime Error

Solution code:
import sys
input=sys.stdin.readline
N=input()
if N<=9:
  print(N)
elif 10<=N<=99:
  print(10)
elif 100<=N<=999:
  print(9+(N-99))
elif 1000<=N<=9999:
  print(909)
elif 10000<=N<=99999:
  print(909+(N-9999))
else:
  print(90909)

Submission status: Runtime Error

Solution code:
import sys
input=sys.stdin.readline
N=input()
if N<=9:
  print(N)
elif N<=99:
  print(10)
elif N<=999:
  print(9+(N-99))
elif N<=9999:
  print(909)
elif N<=99999:
  print(909+(N-9999))
else:
  print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())
if N<10:
    print(N)
elif N<100:
    prnt(9)
elif N<1000:
    print(N-90)
else:
    print(90909)

Submission status: Runtime Error

Solution code:
N=input()
Num = len(N)
if Num == 5:
		Ans = (int(N)-9999) + 900 + 9
elif Num == 4:
		Ans = 900 + 9
elif Num == 3:
		Ans = (int(N)-99) + 9
elif Num == 2:
		Ans = 9
elif Num == 1:
		Ans = N
print(Ans)

Submission status: Runtime Error

Solution code:
program unevennumbers

implicit none

integer::n,i,l,count=0,t=0

read*,n

!print*,n

do i=1,n
   if(i<10) then
      count=count+1
   else if(10<=i .and. i<100)then
      continue
   else if(100<=i .and. i<1000)then
      count=count+1
   else if(1000<=i .and. i<10000)then
      continue
   else
      count=count+1
   end if
end do

print*,count

end program unevennumbers

Submission status: Runtime Error

Solution code:
n=input()
l=len(n)
a="90909"[:l-1]
print(a if l %2 ==0 else int(n)-int(a))

Submission status: Runtime Error

Solution code:
N =int(input())
if N >=10 and N<=99:
  print(9)
elif N >=100 and N<=999:
  print(N-90)
elif N >= 1000 and N<= 9999:
  print(900)
elif N >= 10000 and N<= 99999:
  print(N-90-9000)
elif N = 100000:
  print(9 + 900 + 90000)
else:
  print(N)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
result = 0
for n in range(int(input())):
    result += len(n+1)%2
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
k = 0
for i in range(1, N+1):
    if 1 =< i < 10:
        k += 1
    elif 100 =< i < 1000:
        k += 1
    elif 10000 =< i < 100000:
        k += 1
print(k)

Submission status: Runtime Error

Solution code:
N = int(input())
k = 0
for i in range(1, N+1):
    if 1 =< i < 10:
        k += 1
    if 100 =< i < 1000:
        k += 1
    if 10000 =< i < 100000:
        k += 1
print(k)

Submission status: Runtime Error

Solution code:
N =int(input())
k = 0
for i in range(1, N+1):
    if 1 =< i <10:
        k += 1
    if 100 =< i <1000:
        k += 1
    if 10000 =< i <100000:
        k += 1
print(k)

Submission status: Runtime Error

Solution code:
n = input()
l = len(n)
count = 0

for i in range(1, l, 2):
  count += 9 * 10 ** (i-1)

if l % 2 == 1:
  count += int(n[1:]) + 1

print(count)

Submission status: Runtime Error

Solution code:
n = input()
count = 0
start = 1
while start < len(n):
    count += 10**start - 10**(start -1)
    start +=2

if len(n) % 2 == 0:
    print(count)
else:
    print(count + int(n[1:]) + 1)

Submission status: Runtime Error

Solution code:
N = input()

ans = 0
for i in len(1,N+1):
  if i % 2 == 0:continue
  else:
    ans += 10**i - 10**(i-1)
    
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
if N<10:
  print(N)
elif 10=<N<100:
  print(9)
elif 100=<N<1000:
  print(N-90)
elif 1000=<N<10000:
  print(909)
elif 10000=<N<100000:
  print(N-9090)
else:
  print(90909)

Submission status: Runtime Error

Solution code:
N=int(input())
if N<=9:
  print(N)
elif 10<=N<=99:
  print(9)
elif 100<=N<=999:
  print(N-90)
elif 1000<=N<=9999:
  print(909)
elif 10000<=N<=99999:
  priint(918+N-9999)
else:
  print(90909)

Submission status: Runtime Error

Solution code:
num = list(range(1, (int(input()-1))))

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int (input())
if N < 10:
  print (N)
if N >=10 && N <100:
  print ("9")
if N >=100 && N < 1000:
  print (N - 99 + 9)
if N >= 1000 && N < 10000:
  print ("909")
if N >=10000 && N < 100000:
  print (N - 9999 + 900 + 9)
if N == 100000:
  print ("90909")

Submission status: Runtime Error

Solution code:
n = int(input())
total = 0
val1 = int(math.ceil(math.log(n,10)))
ans = 0
if val1==1:
	ans = n
elif val1==2:
    ans = 9
elif val1==3:
	ans = 9+n-99
elif val1==4:
	ans = 909
elif val1==5:
	ans = 909+n-9999
else:
	ans = 90909
if val1==math.log(n,10) and val1%2:
	print(ans-1)
else:
	print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
if 1 <= N <= 99:
	print(9)
elif 100 <= N <= 999:
	print(N-100+1+9)
elif 1000 <= N <=9999:
	print(9+900)
elif: 10000 <= N <= 99999
	print(N-10000+1+9+900)
else:
	print(90909)

Submission status: Runtime Error

Solution code:

    
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
n=int(input())

a=n//10000
b=(n-10000*a)//1000
c=(n-10000*a-1000*b)//100
d=(n-10000*a-1000*b-100*c)//10
e=(n-10000*a-1000*b-100*c-10*d)

if a=0:
	if b=0:
		if c=0:
			if d=0:
				print(n)
			else:
				print(9)
		else:
		 print(n-90)
	else:
		print(909)
else:
	print(n-9090)
	
print(90909)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(1, len(str(N)), 2):
    ans += 10**i - 10**(i-1)
ans += (int(str(N)[1:]) + 1) * (1 if len(str(N)) % 2 == 1 else 0)
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = 0
for i in range(n+1):
  l = list(i)
  if len(l) % 2 == 1:
    s += 1
print(s)

Submission status: Runtime Error

Solution code:
n = input()
s = 0
for i in range(n+1):
  l = list(str(i))
  if len(l) % 2 == 1:
    s += 1
print(s)

Submission status: Runtime Error

Solution code:
n = input()
s = 0
for i in range(n+1):
  l = list(int(i))
  if len(l) % 2 == 1:
    s += 1
print(s)

Submission status: Runtime Error

Solution code:
n = input()
s = 0
for i in range(n+1):
  l = list(i)
  if len(l) % 2 = 1:
    s += 1
print(s)

Submission status: Runtime Error

Solution code:
n = int(input())

#5桁 3桁 1桁な n 以下の数をカウント

if n >= 100000:
    print(n%100000 + n%1000 n%10)
elif n >= 1000:
    print(n%1000 + n%10)
else :
    print(n%10)

Submission status: Runtime Error

Solution code:
N = input()
#N = "100000"

digit = len(N)
if digit > 1:
    if digit % 2 != 0:
        n = int(N[0])
        ans = int(N[1:]) + (n-1) * 10**digit + 1
    else:
        ans = 0
    digit -= 1

for i in range(digit, 0, -1):
    if i %2 == 0:
        continue
    ans += 9 * 10**(i-1)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ans = len(N)

if ans = 1:
	print(N)

Submission status: Runtime Error

Solution code:
N = int(input())

if N <= 9
	print(N)

Submission status: Runtime Error

Solution code:
N = int(input())

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

Submission status: Runtime Error

Solution code:
n=int(input())
list=filter(lambda x:x%2==1,range(1,n+1))
print(len(list))

Submission status: Runtime Error

Solution code:
n=int(input())
list=filter(lambda x:x%2==1,range(1,n+1))
print(list.count())

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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)
        '0'.join(d)
        d = int(d + '0')
        print(a-d)

Submission status: Runtime Error

Solution code:
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:
        d = '9' * (b // 2)
    '0'.join(d)
    d = int(d)
    if b > 1:
        print(d + int(a[1:]) + 1)
    else:
        print(int(a))

Submission status: Runtime Error

Solution code:
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:
        d = '9' * (b // 2)
    '0'.join(d)
    d = int(d)
    if b > 1:
        print(d + int(a[1:]) + 1)
    else:
        print(d + int(a) + 1)

Submission status: Runtime Error

Solution code:
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:
        d = '9' * (b // 2)
    '0'.join(d)
    d = int(d)
    print(d + int(a[1:]) + 1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Na = int(input())
if 9 >= Na:
  Na2 = Na
elif 99 >= Na:
  Na2 = 9
elif 999 >= Na:
  Na2 = Na - 90
elif 9999 >= Na:
  Na2 = 909
elif 99999 >= Na:
  Na2 = Na - 9090
print(Na2)

Submission status: Runtime Error

Solution code:
Na = int(input())
if 9 >= Na:
  Na2 = Na
elif 99 >= Na:
  Na2 = 9
elif 99>= Na:
  Na2 = Na - 90
elif 9999>= Na:
  Na2 = 9090
elif 99999>= Na:
  Na2 = Na - 9090
print(Na2)

Submission status: Runtime Error

Solution code:
Na = int(input())
if 9 >= Na:
  Na2 = Na
  print(Na)
  break
elif 99 >= Na:
  Na2 = 9
  print(Na2)
  break
elif 99>= Na:
  Na2 = Na - 90
  print(Na2)
  break
elif 9999>= Na:
  Na2 = 9090
  print(Na2)
  break
elif 99999>= Na:
  Na2 = Na - 9090
  print(Na2)
  break

Submission status: Runtime Error

Solution code:
Na = int(input())
if 9 >= Na:
  Na2 = Na
  print(Na)
elif 99 >= Na:
  Na2 = 9
  print(Na2)
elif: 100>= Na
  Na2 = Na - 91
elif: 9999>= Na
  Na2 = 9090
elif: 100000>= Na
  Na2 = Na - 9091

Submission status: Runtime Error

Solution code:
Na = int(input())
Na2
if 9 >= Na:
  Na2 = Na
  print(Na)
elif 99 >= Na:
  Na2 = 9
  print(Na2)
elif: 100>= Na
  Na2 = Na - 91
elif: 9999>= Na
  Na2 = 9090
elif: 100000>= Na
  Na2 = Na - 9091

Submission status: Runtime Error

Solution code:
n = int(input())

if 1 <= n <= 99:
    print(min(n,9))
elif 100<= n <= 9999:
    print(min(n-90,910))
elif:
    print(n-9080)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
i = int(n)
cnt = 0
ans = 0
while i > 0:
  i /= 10
  cnt++
if cnt / 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
else :
  i = (cnt / 2) + 1
  if i == 3:
    ans = 9 + 900 + (int(n) - 10000) + 1
  elif i == 2:
    ans = 9 + (int(n) - 100) + 1
  else :
    ans = int(n)
print(ans)

Submission status: Runtime Error

Solution code:
n = map(int, input())
i = n
cnt = 0
ans = 0
while i > 0:
  i /= 10
  cnt++
  
if cnt / 2 == 0:
  i = cnt / 2
  if i == 3:
      ans = 90000 + 900 + 9
  elif i == 2:
      ans = 900 + 9
  else :
      ans = 9
  
else :
  i = (cnt / 2) + 1
  if i == 3:
    ans = 9 + 900 + (n - 10000) + 1
  elif i == 2:
    ans = 9 + (n - 100) + 1
  else :
    ans = n

print(ans)

Submission status: Runtime Error

Solution code:
n = input()
l = []
for i in range(1,int(n)+1):
  if len(i)%2 != 0:
    l.append(i)

print(len(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
#N以下の正の整数の文字列を生成



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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
n=len(a)
a=int(a)
b=0
if n%2==0:
	for i in range(int(n/2)):
		b+=100**i
	print(9*b)
else:
	for i in range(int//2):
		b+=100**i
	print(9*b+a-10*(n-1) +1)

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A = np.array(list(map(float, input().split())))

print(np.reciprocal(np.sum(np.reciprocal(A))))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
N=int(N.split()[0])

if 1<=N,N<=9:
    output=N
elif 10<=N,N<=99:
    output=9
elif 100<=N,N<=999:
    output=N-99+9
elif 1000<=N,N<=9999:
    output=900+9
elif 10000<=N,N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

Submission status: Runtime Error

Solution code:
N=input()
count=0
for i in range(1,N+1):
  ks=len(str(i))
  if ks!=2 and ks!=4:
    count=count+1
print(count)

Submission status: Runtime Error

Solution code:
N=input()
count=0
for i in range(1,N+1):
  ks=len(str(i))
  if ks!=2 and ks!=4:
    count=count+1
print count

Submission status: Runtime Error

Solution code:
#another way:
def count_digits(n):
    d=0
    while(n>0):
        d += 1
        n = n//10
    return d
c=0
for i in range(1,N+1):
    if (count_digits(i)%2==1):
        c += 1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = str(input())
dig = len(n)
ret = 0

if dig > 0:
    for tmp_dig in range(0, dig-1, 2):
        ret += 9 * ( 10 ** (tmp_dig) )
else:
    print(int(n))
    exit()

if len(n) % 2:
    ret += int(n[1:])+1

print(ret)
exit()

Submission status: Runtime Error

Solution code:
c = input() #print(c)
ini = c.split() #print(ini[1])
k = int(ini[0]) #k
s = int(ini[1]) #s

count = 0
#print('k:{0} s:{1}'.format(k, s))
def loop():
    count = 0
    for z in reversed(range(k+1)):
        if z + k*2 < s :
            break
        for y in reversed(range(k+1)):
            if z + k*2 < s :
                break
            for x in reversed(range(k+1)):
                if x + y + z == s:
                    count +=1
                    break
    return count

count = loop()
#print('count = {0}'.format(count))
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
cnt = 0
for i in range(1,n+1):
  if len(i) == 1:
    cnt+=1
  elif len(i)>1 and len(i) % 2 != 0:
    cnt+=1
    
print(cnt)

Submission status: Runtime Error

Solution code:
n = int(input())
cnt = 0
for i in range(1,n):
  if len(i) == 1:
    cnt+=1
  elif len(i)>1 and len(i) % 2 != 0:
    cnt+=1
    
print(cnt)

Submission status: Runtime Error

Solution code:
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  if n=="0":
    print(1)
  else:
    print(int(n)-int(zeronine))

Submission status: Runtime Error

Solution code:
n = input()

zero = "0"
nine = "9"
zeronine = ""

for index in range(len(n)-1):
  if index%2==1:
    zeronine += zero
  else:
    zeronine += nine

if len(n)%2==0:
  print(int(zeronine))
else:
  print(int(n)-int(zeronine))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
s = str(a)
c = 0
for i in range(len(s)-1):
    # print(c)
    if i%2 == 0:
        c += 10**(i+1) - 10**i 

if len(s) %2 == 1:
    c += int(s[1:])+1

print(c)

Submission status: Runtime Error

Solution code:
re = {0:9, 1:0, 2:899, 3:0, 4:89999, 5:0, 6:8999999}
be = {0:9, 2:99, 4:9999, 6:999999}
a = input()

b = len(a)

cnt = 0
if b >= 1:
  for i in range(b-1):
    x = re[i]
    cnt += x

if b-1 in be:
  y = be[b]
  cnt += int(a) - y


print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range[1,N+1]:
  if len(str(i)) % 2 == 1:
    sum += 1
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range[1,N+1]:
  if len(i) % 2 == 1:
    sum += 1
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())
sum = 0
for i in range[1,N+1]:
  if len(i) // 2:
    i += 1
  else:
    sum += 1
    i += 1
print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
digit_count = len(str(N))
if digit_count == 1:
    print(N)
if (digit_count % 2 == 1):
    print(N - int(str(90) * (digit_count//2)))
else:
    total = 0
    for i in range(0, digit_count//2):
        total += 9*(100**i)
    print(total)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N= int(input())
if N == 1:
# -*- coding: utf-8 -*-
N = int(input())
digit_count = len(str(N))
if digit_count == 1:
    print(N)
if (digit_count % 2 == 1):
    print(N - int(str(90) * (digit_count//2)))
else:
    total = 0
    for i in range(0, digit_count//2):
        total += 9*(100**i)
    print(total)

Submission status: Runtime Error

Solution code:
N=int(input())

if N<=9:
    print(N)
elif N<=99:
    print(9)
elif N<=999:
    X=9+(N-99)
    print(X)
elif N<=9999:
    print(909)
elif N<=99999:
    X=909+(N-9999)
    print(x)
else:
    print(90909)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
 
x = 0
 
for i in range(1,n+1):
  y = len(str(i)) 
    if　y%2 == 0 :
    x = x+1

 
    
print(y)

Submission status: Runtime Error

Solution code:

n=int(input())

x = 0

for i in range(1,n+1):
  y = len(i) 
  if　y%2 == 0 :
    x = x+1

    
print(x)

Submission status: Runtime Error

Solution code:
number=0
for i in range(N):
  if len(str(i))%2==0:
    pass
  else:
    number+=1
return number

Submission status: Runtime Error

Solution code:
n = int(input())
res = 0
keta = 1
for i in range(1, n+1):
  if i % (10 ** keta) == 0:
    keta += 1
  if keta % 2 == 1:
    rest += 1
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
res 0
keta = 1
for i in range(1, n+1):
  if i % (10 ** keta) == 0:
    keta += 1
  if keta % 2 == 1:
    rest += 1
print(res)

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
n = int(input())

if(n <= 9):
    return n

elif(n <= 99):
    return 9

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

elif(n <= 9999):
    return 909

elif(n <= 99999):
    return (n - 9090)

else:
    return 90909

Submission status: Runtime Error

Solution code:
N = int(input())
if N == 10**5:
  res = 90909
elif 10**4 <= N < 10**5:
  res = N-9089
elif 10**3 < N < 10**4:
  res = 910
elif 10**2 < N < 10**3:
  res = N-90
elif 1 <= N < 10**2:
  res = N
print(res)

Submission status: Runtime Error

Solution code:
N = int(input())
if N = 10**5:
  print(90909)
elif 10**4 <= N < 10**5:
  print(N-9089)
elif 10**3 < N < 10**4:
  print(910)
elif 10**2 < N < 10**3:
  print(N-90)
elif 1 <= N < 10**2:
  print(N)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()
count=0
for i in range(1,N):
  if len(i)%2!=0:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
N=int(input())

n=len(str(N))//2
full=0
for i in range(n):
    full+=int('9'+'0'*i*2)

if len(str(N))%2==0:
    b=0
else:
    nines=int('9'*(len(str(N))-1))
    b=N-nines
ans=full+b
print(ans)

Submission status: Runtime Error

Solution code:
n = input()
c=0
a = [x for i in range(n)]
for x in a:
  if len(str(x)) % 2 == 1:
    c += 1
    
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(int(i))//2 != 1:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
 
for i in range(1,n+1):
  if len(i)//2 != 1:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
 
for i in n:
  if len(i)//2 != 0:
    count += 1
 
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0

for i in n:
  if len(i)% != 0:
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
N = input()
n = len(list(N))
d_list = [9, 900, 90000]
if n >= 5:
  ans = 90909
elif n >= 4:
  ans = 909
elif n >= 3:
  ans = 9 + N % 1000
elif n >= 2:
  ans = 9
else:
  ans = N % 10
print(ans)

Submission status: Runtime Error

Solution code:
N = input()
n = len(list(n))
d_list = [9, 900, 90000]
if n >= 5:
  ans = 90909
elif n >= 4:
  ans = 909
elif n >= 3:
  ans = 9 + N % 1000
elif n >= 2:
  ans = 9
else:
  ans = N % 10
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())
b=len(str(a))

ans=0

if b%2==0:
    for i in range(int(b/2)):
        c=1+i*2
        ans+=(10**c-1)

else:
    ans+=(a-(10**(b-1)))
    for i in range((b-1)/2):
        e=1+i*2
        ans+=(10**c-1)

print(int(ans))

Submission status: Runtime Error

Solution code:
N = int(input())

n = len(str(N))
if n % 2 == 0:
    s = "90" * (n//2)
    print(s[:-1])
    
else:
    s = "90" * ((n-1) // 2)
    ans = int(s[:-1]) + N - 10**(n-1) + 1
    print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

if n < 10:
	print(n)
elif n < 100:
	print(9)
elif n < 1000:
	print(9 + n - 99)
elif n == 1000:
	print(909)
elif n < 10_000:
	print(909)
elif n == 10_000:
	print(910)
elif n < 100_000:
	print(909 + n-9999)
elif n == 100_000:
	print(90909)
else:
	pass

Submission status: Runtime Error

Solution code:
n = int(input())

if n < 10:
	print(n)
elif n < 100:
	print(9)
elif n < 1000:
	print(9 + n - 99)
elif n == 1000:
	print(909)
elif n < 10_000:
	print(909)
elif n == 10_000:
	print(910)
elif n < 100_000:
	print(909 + n-9999)
elif n == 100_000:
	print(90909)

Submission status: Runtime Error

Solution code:
N=int(input())
s=list(N)
h=len(s)
if h%2==1:
  a=N-(10**(h-1))+1
  a=a+((100**((h-1)/2))-1)/11
  print(a)
elif h%2==0:
  a=((100**(h/2))-1)/11
  print(a)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
 
n = int(input())
if n / 10000 >= 1:
  print(9 + 900 + n - 10000 + 1)
else if n / 100 >= 1:
  print(9 + n - 100 + 1)
else if n / 10 >= 1:
  print(9)
else if n < 10:
  print(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
ans = 0
for i in range(1, len(n)):
    if i%2: ans+=10**(i-1)*9
if len(n)%2: ans += int(n[1:])+1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=input()

if 1<=N,N<=9:
    output=N
elif 10<=N,N<=99:
    output=9
elif 100<=N,N<=999:
    output=N-99+9
elif 1000<=N,N<=9999:
    output=900+9
elif 10000<=N,N<=99999:
    output=N-9999+900+9
else:
    output=90000+900+9
print(output)

Submission status: Runtime Error

Solution code:
N=input()

if 1<N,N<9:
    output=N
elif 10<N,N<99:
    output=9
elif 100<N,N<999:
    output=N-100+9
elif 1000<N,N<9999:
    output=909
elif 10000<N,N<99999:
    output=N-10000+900+9
else:
    output=90909
print(output)

Submission status: Runtime Error

Solution code:

 
def uneven_numbers(some_int):
  i = some_int
  c = 0
  while (i >= 1):
    some_int_len = len(str(some_int))
    if some_int_len % 2 == 1:
    	i = i - int("1" + ''.join("0" * (len(str(i)) - 1)) )  
        c += i
    else:
		i = int("9" + ''.join("0" * (len(str(i)) - 2)) )
	return c
  
 uneven_numbers(input())

Submission status: Runtime Error

Solution code:


def odd_string(number_string):
  my_string = len(str(number_string)) + 1
  if my_string % 2 == 0: 
  	return false
  else:
    return true
 
def Uneven_Numbers(some_int):
  i = some_int
  c = 0
  while (i >= 1):
    some_int_len = len(str(some_int))
    if some_int_len % 2 == 1:
    	i = i - int("1" + ''.join("0" * (len(str(i)) - 1)) 
        c += i
    else:
		i = int("9" + ''.join("0" * (len(str(i)) - 2))
	return c

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(kekka)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())

if n<100:
  print(min(n,9))
elif n<10000:
  print(min(n-90),909)
else:
  print(min(n-9090),90909)