problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03282
u139112865
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["#106_C\nS=input()\nK=int(input())\nfor i in range(len(S)):\n if S[i]!='1':\n ans=i\n break\nprint(ans)\nprint('1' if K<=ans else S[ans])", "#106_C\nS=input()\nK=int(input())\nans=0\nfor i in range(len(S)):\n if S[i]!='1':\n ans=i\n break\n\nprint('1' if K<=ans else S[ans])"]
['Runtime Error', 'Accepted']
['s797313032', 's540375181']
[2940.0, 3060.0]
[17.0, 17.0]
[145, 141]
p03282
u140191608
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['ans = 0\nif int(str(S)[0]) == 1 and K == 1:\n ans = 1\nelif int(str(S)[0]) != 1:\n ans = int(str(S)[0])\nelse:\n ans = int(str(S)[1])\nprint(ans)', 'S = int(input())\nK = int(input())\n\nfor i in range(len(str(S))):\n if int(str(S)[i]) == 1:\n if (K-1) == i:\n print(int(str(S)[i]))\n break\n continue\n else:\n print(int(str(S)[i]))\n break']
['Runtime Error', 'Accepted']
['s302375099', 's213401044']
[3060.0, 3060.0]
[17.0, 17.0]
[147, 237]
p03282
u152671129
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = list(map(int, input().split()))\nk = int(input())\n\nanswer = 1\nfor i in range(min(k, len(s))):\n if s[i] != 1:\n answer = s[i]\n break\n\nprint(answer)\n', "s = input()\nk = int(input())\n\nprint(s)\n\nanswer = 1\nfor i in range(min(k, len(s))):\n if s[i] != '1':\n answer = s[i]\n break\n\nprint(answer)", "s = list(map(int, input().split()))\nk = int(input())\n\nanswer = 1\nfor i in range(min(k, len(s))):\n if s[i] != '1':\n answer = s[i]\n break\n\nprint(answer)", "s = list(input())\nk = int(input())\n\nanswer = 1\nfor i in range(min(k, len(s))):\n if s[i] != '1':\n answer = s[i]\n break\n print(i)\n\nprint(answer)", "s = input()\nk = int(input())\n\nanswer = '1'\nfor i in range(min(k, len(s))):\n if s[i] != '1':\n answer = s[i]\n break\n print(i)\n\nprint(answer)", "n = int(input())\ncnt = 0\n\nfor i in range(n):\n l, r = list(map(int, input().split(' ')))\n cnt += r - l + 1\n\nprint(cnt)", "s = input()\nk = int(input())\n\nanswer = 1\nfor i in range(min(k, len(s))):\n if s[i] != '1':\n answer = s[i]\n break\n\nprint(answer)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s200437016', 's220502286', 's377457158', 's521343596', 's671417427', 's834575951', 's800438430']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 19.0]
[166, 153, 167, 162, 158, 123, 143]
p03282
u155828990
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['import sys\ns=input()\nk=int(input())\nif(len(s)==1):\n print(s[0])\n sys.exit()\nc=0\nfor i in range(k):\n if(s[i]==1):c+=1\n else:break\nif(c==k):\n print(1)\nelse:\n if(c==0):print(s[0])\n else:print(s[c+1])', "import sys\ns=input()\nk=int(input())\nif(len(s)==1):\n print(s[0])\n sys.exit()\nif(k==1):\n print(s[0])\n sys.exit()\nc=0\nfor i in range(k):\n if(s[i]=='1'):c+=1\n else:break\nif(c==k):\n print(1)\nelse:\n if(c==0):print(s[0])\n else:print(s[c+1])", "import sys\ns=input()\nk=int(input())\nif(len(s)==1):\n print(s[0])\n sys.exit()\nif(k==1):\n print(s[0])\n sys.exit()\nc=0\nfor i in range(k):\n if(s[i]=='1'):c+=1\n else:break\nif(c==k):\n print(1)\nelse:\n print(s[c])"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s553127849', 's821823747', 's856191275']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[217, 260, 228]
p03282
u163320134
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=input()\nk=int(input())\nif s[0]!='1':\n print(s[0])\nelse:\n pos=0\n for i in range(len(s)):\n if i!=s[:i].count('1'):\n break\n pos=i\n if k<=pos:\n print('1')\n else:\n print(s[pos+1])", "s=input()\nk=int(input())\nif s[0]!='1':\n print(s[0])\nelse:\n pos=0\n for i in range(len(s)):\n if i!=s[:i].count('1'):\n break\n pos=i\n if k<=pos:\n print('1')\n else:\n print(s[pos])"]
['Runtime Error', 'Accepted']
['s465894810', 's124564823']
[3060.0, 3060.0]
[17.0, 17.0]
[198, 196]
p03282
u163449343
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = list(input())\nK = int(input())\nif K == 1:\n print(S[0])\nelse:\n for x in range(S):\n if int(x) != 1:\n print(S[x])\n break', 'S = list(map(int,input()))\nK = int(input())\nans = 1\nif K == 1 or S.count(S[0]) == len(S) or S.count(1) == len(S):\n ans = S[0]\nelse:\n for x in range(K):\n if S[x] != 1:\n ans = S[x]\n break\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s843912078', 's240448341']
[2940.0, 2940.0]
[18.0, 17.0]
[138, 214]
p03282
u163874353
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nfor i in s:\n if i != "1":\n print(i)\n break\nprint(1)\n ', 's = input()\nk = int(input())\nfor i in range(k):\n if s[i] != "1":\n print(s[i])\n exit()\nprint(1)']
['Wrong Answer', 'Accepted']
['s163077526', 's710886602']
[2940.0, 2940.0]
[17.0, 17.0]
[106, 111]
p03282
u169138653
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=input()\nk=int(input())\nok=True\nfor i in range(len(s)):\n if i<k:\n if s[i]!='1':\n ok=False\n a=s[i]\n else:\n break\nif ok:\n print('1')\nelse:\n print(a)", "s=input()\nk=int(input())\nok=True\nfor i in range(len(s)):\n if i<k:\n if s[i]!='1':\n ok=False\n a=s[i]\n break\n else:\n break\nif ok:\n print('1')\nelse:\n print(a)\n"]
['Wrong Answer', 'Accepted']
['s351799232', 's403028285']
[3060.0, 2940.0]
[17.0, 18.0]
[167, 180]
p03282
u170324846
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\n\nk = -1\nwhile S[k+1] == "1":\n k += 1\n print(k)\n\nif K <= k:\n print(1)\nelse:\n print(S[k+1])', 'import sys\nS = input()\nK = int(input())\n\nfor i in range(K):\n if S[i] != "1":\n print(S[i])\n sys.exit()\nprint(1)']
['Runtime Error', 'Accepted']
['s949242280', 's457251211']
[3060.0, 2940.0]
[17.0, 17.0]
[122, 117]
p03282
u170765582
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["a=input()\nk=0\nwhile a[k]==1 and len(a)>k:\n k+=1\nb=int(input())\nif b<k or a=='1'*len(a):print(1)\nelse:print(a[k])", "a=input()\nb=int(input())\nif b<101:\n if a[:b]=='1'*b:print(1)\n else:\n k=0\n while a[k]=='1':k+=1\n print(a[k])\nelse:\n k=0\n while a[k]=='1':k+=1\n print(a[k])"]
['Wrong Answer', 'Accepted']
['s819642862', 's025892074']
[2940.0, 3060.0]
[17.0, 18.0]
[113, 167]
p03282
u171065106
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nprint(s[0])', 's = input()\nk = int(input()) - 1\n\n\nfor i in range(len(s)):\n if s[i] != "1" or i == k:\n break\n\nprint(s[i])']
['Wrong Answer', 'Accepted']
['s172295861', 's854615382']
[9156.0, 9080.0]
[28.0, 25.0]
[41, 115]
p03282
u177756077
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S=str(input())\nK=int(input())\nfor i in range(len(S)) :\n if S[i]!=1 :\n break\nprint(S[i])', 'S=str(input())\nK=int(input())\nfor i in range(K) :\n# print("checking "+S[i])\n if S[i]!="1" :\n break\nprint(S[i])']
['Wrong Answer', 'Accepted']
['s087823620', 's490935346']
[2940.0, 2940.0]
[17.0, 17.0]
[97, 123]
p03282
u183840468
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['def make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n \n return divisors\n\n\nn = int(input())\nans = 0\nif n < 105:\n print(0)\nelse:\n for i in range(105,n+2,2):\n m = make_divisors(i)\n if len(m) == 8:\n ans += 1\n\nprint(ans)', "s = input()\nk = int(input())\n\nct = 0\nfor i in range(len(s)):\n if s[i] != '1':\n ct += i+1\n break\n\nif ct > k:\n print(1)\nelse:\n print(s[ct-1])"]
['Wrong Answer', 'Accepted']
['s679475707', 's979987641']
[3316.0, 2940.0]
[2104.0, 17.0]
[394, 162]
p03282
u187205913
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s = list(input())\nk = int(input())\nfor i in range(k):\n s_ = s[i]\n if not s_=='1':\n print(s_)\n break\nprint('1')", "s = list(input())\nk = int(input())\nfor i in range(k):\n s_ = s[i]\n if not s_=='1':\n print(s_)\n exit()\nprint('1')\n"]
['Wrong Answer', 'Accepted']
['s755145225', 's209505588']
[2940.0, 2940.0]
[17.0, 17.0]
[118, 120]
p03282
u189326411
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nif len(s)>k and all(s[i]=="1" for i in range(k)):\n print(1)\nelse:\n print(s[0])\n', 's = input()\nk = int(input())\n\nif len(s)>k and all(s[i]=="1" for i in range(k)):\n print(1)\nelse:\n while s[0]=="1":\n s.pop(0)\n print(s[0])\n', 's = input()\nk = int(input())\n\nif all(s[i]=="1" for i in range(min(len(s),k))):\n print(1)\nelse:\n while s[0]=="1":\n s.pop(0)\n print(s[0])\n', 's = input()\nk = int(input())\n\nif all(s[i]=="1" for i in range(min(len(s),k))):\n print(1)\nelse:\n while s[0]=="1":\n s = s[1:]\n print(s[0])\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s201184578', 's713401205', 's805434151', 's495285335']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 19.0, 20.0, 17.0]
[115, 153, 152, 153]
p03282
u189575640
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['import sys\n# N,M = [int(n) for n in input().split()]\n# S = str(input())\n# T = str(input())\n\nS = str(input())\nK = int(input())\nnumplace = 0\n\nfor i in range(len(S)):\n if (S[i] == "1"):\n numplace+=1\n else:\n numplace+= int(S[i])**5000000000000000\n if(numplace>=K):\n print(S[i])\n sys.exit()\n', 'import sys\n# N,M = [int(n) for n in input().split()]\n# S = str(input())\n# T = str(input())\nS = str(input())\nK = int(input())\n\nfor i in range(len(S)):\n if(S[i] == "1" and i+1 == K:\n print("1")\n sys.exit()\n elif(S[i]!="1"):\n print(S[i])\n sys.exit()\n', 'import sys\n# N,M = [int(n) for n in input().split()]\n# S = str(input())\n# T = str(input())\nS = str(input())\nK = int(input())\n\nfor i in range(len(S)):\n if(S[i] == "1" and i+1 == K):\n print("1")\n sys.exit()\n elif(S[i]!="1"):\n print(S[i])\n sys.exit()\n']
['Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s401442890', 's687637918', 's534085303']
[197060.0, 2940.0, 2940.0]
[2106.0, 18.0, 18.0]
[323, 281, 282]
p03282
u191635495
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['import math\nfrom collections import deque\n\ns = input()\nk = int(input())\ns_list = list(map(int, list(s)))\n\nif len(s) == 1:\n print(int(s))\nelif k == 1:\n print(s_list[0])\nelse:\n print(s_list[0])', 'S = input()\nK = int(input())\ns_list = list(map(int, list(S)))\n\nflag = False\nfor k in range( min(len(S), K) ):\n if s_list[k] != 1:\n flag = True\n break\n\nif flag:\n print(s_list[k])\nelse:\n print(1)']
['Wrong Answer', 'Accepted']
['s120280647', 's563203266']
[3316.0, 3060.0]
[21.0, 19.0]
[200, 216]
p03282
u192588826
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nonesum = 0\nwhile s[0] == "1" and len(s) > 0\n s = s[1:]\n onesum += 1\nif k <= onesum:\n print(1)\nelse:\n print(s[0])\n', 's = input()\nk = int(input())\nonesum = 0\nwhile s[0] == "1":\n onesum += 1\n if len(s) == 1:\n break\n s = s[1:]\nif k <= onesum:\n print(1)\nelse:\n print(s[0])\n']
['Runtime Error', 'Accepted']
['s295538884', 's178902047']
[2940.0, 2940.0]
[17.0, 18.0]
[154, 174]
p03282
u193927973
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\nif s[0]=="1":\n print(1)\nelse:\n print(s[1])', 's=input()\nk=int(input())\nif k==1 or len(s)==1:\n print(s[0])\nelse:\n for i in range(k):\n if s[i]!="1":\n print(s[i])\n exit()\n print(1)\n\n ']
['Runtime Error', 'Accepted']
['s307324945', 's584655670']
[8820.0, 9084.0]
[25.0, 28.0]
[69, 151]
p03282
u201928947
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nfor i in range(min(k,len(s))):\n if s[i] != 1:\n print(s[i])\n exit()\nelse:\n print(1)', 's = input()\nk = int(input())\nfor i in range(min(k,len(s))):\n if s[i] != "1":\n print(s[i])\n exit()\nelse:\n print(1)']
['Wrong Answer', 'Accepted']
['s856735015', 's101145773']
[2940.0, 3060.0]
[17.0, 17.0]
[131, 133]
p03282
u207185597
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = list(input())\nk = int(input())\nif k >= 2 and s[0] == 1:\n print(s[1])\nif len(s) == 1:\n print(s[0])\nelse:\n print(s[0])\n', 's = list(input())\nk = int(input())\nfor i in range(k):\n if s[i] != 1:\n l = [i for i in s if i != 1]\n print(l[0])\n break\nelse:\n print(1)\n', 's = list(input())\nk = int(input())\ncnt = 0\nif k >= len(s):\n x = len(s)\nelse:\n x = k\n\nfor i in range(x):\n if s[i] == 1:\n cnt += 1\nif cnt == len(s):\n print(1)\nelse:\n for j in s:\n if int(j) >= 1:\n print(int(j))\n break', "s = list(input())\nk = int(input())\ncnt = 0\nx = min(len(s),k)\nfor i in range(x):\n if s[i] != '1':\n print(s[i])\n break\nelse:\n print(1)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s245899010', 's496875813', 's501865333', 's126786367']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0, 18.0]
[130, 162, 265, 152]
p03282
u210827208
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\n\nif s[0]==1:\n print(s[1])\nelse:\n print(s[0])', 's=input()\nk=int(input())\n\nif s[0]==1 and k!=1:\n print(s[1])\nelse:\n print(s[0])\n ', "s=input()\nk=int(input())\ncnt=0\nfor i in range(len(s)):\n if s[i]=='1':\n cnt+=1\n else:\n break\n\nif k>cnt:\n print(s[cnt])\nelse:\n print(1)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s074485164', 's244199039', 's224874180']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[75, 89, 159]
p03282
u214434454
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nfor i in (len(s)):\n if s[i] != "1":\n ans = int(s[i])\n break\nprint(ans)', 's = input()\nk = int(input())\nans = 1\nif k =< len(s):\n if s[:k] == "1" * k:\n ans = 1\n else:\n ans = int(s[k-1])\nelse:\n for i in range(len(s)):\n if s[i] != "1":\n ans = int(s[i])\n break\nprint(ans)', 's = input()\nk = int(input())\nans = 1\nif k <= len(s):\n if s[:k] == "1" * k:\n ans = 1\n else:\n ans = int(s[k-1])\nelse:\n for i in range(len(s)):\n if s[i] != "1":\n ans = int(s[i])\n break\nprint(ans)', 's = input()\nk = int(input())\nans = 1\nif k <= len(s):\n if s[:k] == "1" * k:\n ans = 1\n else:\n for i in range(len(s)):\n if s[i] != "1":\n ans = int(s[i])\n break\nelse:\n for i in range(len(s)):\n if s[i] != "1":\n ans = int(s[i])\n break\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s022817305', 's198956958', 's207014620', 's079806258']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0, 18.0]
[116, 244, 244, 332]
p03282
u215315599
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nfor s in S:\n if s == "1" and S.index(s) < K-1:\n continue\n else:\n print(s)', 'S = input()\nK = int(input())\ncnt = 0\nfor s in S:\n cnt += 1\n if s == "1" and cnt < K:\n continue\n else:\n print(s)', 'S = input()\nK = int(input())\ncnt = 0\nfor s in S:\n cnt += 1\n if s == "1" and cnt < K:\n continue\n else:\n print(s)\n exit()']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s025548333', 's104689313', 's665351501']
[3064.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[122, 134, 149]
p03282
u215743476
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nif k == 1:\n print(s[0])\nelse:\n if s[0] == 1:\n print(s[1])\n else:\n print(s[0])', "s = input()\nk = int(input())\n\nif len(s) == 1:\n print(s[0])\n exit()\n\nif k == 1:\n print(s[0])\nelse:\n i == 0\n while i <= k:\n if s[i] != '1':\n print(s[i])\n break\n elif i == k:\n print(s[i])\n break\n i += 1\n", "s = input()\nk = int(input())\n\ni = 1\nwhile i <= k:\n if s[i-1] != '1':\n print(s[i-1])\n break\n elif i == k:\n print(s[i-1])\n break\n i += 1\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s777917122', 's996022589', 's348008449']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[130, 280, 172]
p03282
u216289806
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['data = input()\nnum = int(input())\n\ncnt = 0\nfor lop in range(len(data)):\n cnt = cnt + (int(data[lop])*1000000000000000000)**5\n if cnt > num:\n print(data[lop])\n break', 'data = input()\nnum = int(input())\n\ncnt = 0\nfor lop in range(len(data)):\n if int(data[lop]) == 1:\n cnt = cnt + 1\n if num == cnt:\n print(data[lop])\n break\n else : \n cnt = cnt + (int(data[lop])*1000000000000000000)**5\n if cnt > num:\n print(data[lop])\n break']
['Wrong Answer', 'Accepted']
['s176360347', 's019307949']
[2940.0, 3060.0]
[20.0, 17.0]
[184, 335]
p03282
u225388820
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=input()\nk=int(input())\ni=0\nwhile True:\n if s[i]=='1' or i<len(s):\n i+=1\n else:\n break\nif i<k-1:\n print(s[1])\nelse:\n print(1)", "s=input()\nk=int(input())\ni=0\nwhile True:\n if i<len(s) and s[i]=='1':\n i+=1\n else:\n break\nif i>=k and len(s)>=2:\n print(s[1])\nelse:\n print(s[0])\n", "s=input()\nk=int(input())\ni=0\nwhile True:\n if i<len(s) and s[i]=='1':\n i+=1\n else:\n break\nif i==0:\n print(s[0])\n exit()\nif i<k:\n print(s[i])\nelse:\n print(s[0])\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s641157096', 's724910312', 's445477815']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[136, 154, 171]
p03282
u226108478
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["# -*- coding: utf-8 -*-\n\n\ndef main():\n s = input()\n k = int(input())\n\n if s[0] == 1:\n print(s[1])\n else:\n print(s[0])\n\n\nif __name__ == '__main__':\n main()\n", "# -*- coding: utf-8 -*-\n\n\ndef main():\n s = input()\n k = int(input())\n one_count = 0\n\n for si in s:\n if si == '1':\n one_count += 1\n else:\n break\n\n if s[0] == '1':\n if k == 1:\n print(s[0])\n elif one_count >= k:\n print(1)\n elif one_count < k:\n print(s[k - 1])\n else:\n print(s[1])\n else:\n print(s[0])\n\n\nif __name__ == '__main__':\n main()\n", "# -*- coding: utf-8 -*-\n\n\ndef main():\n s = input()\n k = int(input())\n count = 0\n\n for si in s:\n if si == '1':\n count += 1\n else:\n break\n\n if s[0] != '1':\n print(s[0])\n else:\n if k <= count:\n print(1)\n else:\n print(s[count])\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s173562836', 's502736642', 's679343437']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 19.0]
[184, 470, 361]
p03282
u228223940
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nfor i in range(k):\n if s[i] == 1:\n continue\n else:\n print(s[i])\n exit()\n \nprint(1)', 's = input()\nk = int(input())\n\nfor i in range(k):\n if int(s[i]) == 1:\n continue\n else:\n print(s[i])\n exit()\n \nprint(1)']
['Wrong Answer', 'Accepted']
['s954102838', 's665483355']
[2940.0, 2940.0]
[17.0, 17.0]
[146, 151]
p03282
u230621983
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=str(input())\nn = int(input())\nfor i in range(n):\n if s[i] != "1":\n print(int(s[i]))\n break\n\telse:\n \tprint("1")', 's = input()\nk = int(input())\nfor i in range(k):\n if s[i] != "1":\n break\nprint(s[i])']
['Runtime Error', 'Accepted']
['s842012398', 's189474326']
[2940.0, 2940.0]
[17.0, 17.0]
[132, 93]
p03282
u239342230
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = str(input())\nK = int(input())\nif S[0] == 1 and K == 1:\n print(1)\n# print('A')\nelif len(S) <= K and list(map(int,list(S[:K]))).count(1) == K:\n print(1)\n# print('B')\nelif len(S) == 1:\n print(S[0])\n# print('C')\nelif S[0] != 1:\n print(S[0])\nelse :\n print(S[1])", 'S = str(input())\nK = int(input())\nif S[0] == 1 & K == 1:\n print(1)\nelif len(S) != 1:\n print(S[0])\nelse:\n print(S[0])', "S = str(input())\nK = int(input())\ni = 0\nif S[0] == '1' and K == 1:\n print(1)\n# print('A')\nelif list(map(int,list(S[:(K-1)]))).count(1) == K-1:\n print(S[K-1])\n# print('B')\n\nelif len(S) == 1:\n print(S[0])\n# print('C')\nelif S[0] != '1':\n print(S[0])\n# print('D')\nelse :\n while(1):\n if list(S[:(K-1)])[i] == '1':\n i = i + 1\n elif i > K:\n print(S[1])\n# print('E')\n else:\n print(list(S[:(K-1)])[i])\n break\n "]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s427008652', 's768745036', 's119998740']
[3060.0, 3060.0, 3064.0]
[17.0, 18.0, 19.0]
[287, 125, 512]
p03282
u244836567
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['a=input()\nb=int(input())\nc=1\nif a[0]!="1":\n print(a[0])\nif a[0]=="1":\n for i in range(len(a)-1):\n if a[i]=="1" and a[i+1]=="1":\n c=c+1\n else:\n break\nif c>b:\n print(1)\nelse:\n print(a[c-1])\n', 'a=input()\nb=int(input())\nc=0\nif a[0]!="1":\n print(a[0])\nif a[0]=="1":\n for i in range(len(a)-1):\n if a[i]=="1" and a[i+1]=="1":\n c=c+1\n else:\n break\nif c>=b:\n print(1)\nelse:\n print(a[c-1])\n', 'a=input()\nb=int(input())\nc=0\nif a[0]!=1:\n print(a[0])\nelse:\n for i in range(len(a)-1):\n if a[i]==a[i+1]:\n c=c+1\n else:\n break\n if c>=b:\n print(1)\n else:\n print(a[1])', 'a=input()\nb=int(input())\nc=0\nif a[0]!="1":\n print(a[0])\nif a[0]=="1":\n for i in range(len(a)-1):\n if a[i]=="1" and a[i+1]=="1":\n c=c+1\n else:\n break\nif c>b:\n print(1)\nelse:\n print(a[c])\n', 'a=input()\nb=int(input())\nc=1\nif a[0]!="1":\n print(a[0])\nif a[0]=="1":\n for i in range(len(a)-1):\n if a[i]=="1" and a[i+1]=="1":\n c=c+1\n else:\n break\n if c>=b:\n print(1)\n else:\n print(a[c+1])\n', 'a=input()\nb=int(input())\nc=1\nif a[0]!="1":\n print(a[0])\nif a[0]=="1":\n for i in range(len(a)-1):\n if a[i]=="1" and a[i+1]=="1":\n c=c+1\n else:\n break\n if c>=b:\n print(1)\n else:\n print(a[c])']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s094041164', 's154868005', 's475051091', 's592354122', 's897217361', 's944179212']
[9168.0, 8972.0, 9096.0, 9004.0, 9028.0, 9128.0]
[29.0, 28.0, 24.0, 30.0, 31.0, 28.0]
[208, 209, 191, 206, 217, 214]
p03282
u245870380
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = input()\n\nif len(S) == 1:\n print(S)\n\nelif set(S) == 1:\n print(S)\n\nelif int(K) == 1:\n print(S[0])\n\nelif S[0] == 1:\n print(S[1])\n \nelse:\n print(int(S[0]))', 'S = input()\nK = input()\n\nfor i in range(int(K)):\n if S[i] == "1":\n if i+1 == int(K):\n print(1)\n break\n else:\n print(S[i])\n break']
['Wrong Answer', 'Accepted']
['s787539723', 's373546136']
[3060.0, 2940.0]
[17.0, 17.0]
[185, 177]
p03282
u247830763
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['import sys\ns = str(input())\nn = int(input())\ni = 0\nprint(s[i])\nwhile True:\n if int(s[i]) == 1:\n if (n-1) == i:\n print("1")\n sys.exit()\n else:\n i += 1\n else:\n print(s[i])\n sys.exit()\n', 'import sys\ns = str(input())\nn = int(input())\ni = 0\nwhile True:\n if s[i] == 1:\n if n-1 == i:\n print("1")\n sys.exit()\n else:\n i += 1\n else:\n print(s[i])\n sys.exit()\n', 's = str(input())\nn = int(input())\nif s[0] == 1:\n print(s[1])\nelse:\n print(s[0])', 'import sys\ns = str(input())\nn = int(input())\ni = 0\nwhile True:\n if s[i] == 1:\n i +=1\n else:\n print(s[i])\n sys.exit()', 'import sys\ns = str(input())\nn = int(input())\ni = 0\nwhile True:\n if int(s[i]) == 1:\n if (n-1) == i:\n print("1")\n sys.exit()\n else:\n i += 1\n else:\n print(s[i])\n sys.exit()\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s111610885', 's117844877', 's439627543', 's819785793', 's114496920']
[2940.0, 3060.0, 3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[249, 230, 85, 143, 237]
p03282
u252828980
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['n = input()\nk = int(input())\n\nif "1" in n:\n one = n.rfind("1")-n.find("1")+1\n #print(n.rfind("1")+1)\n if one < k:\n print(n[n.rfind("1")+1])\n elif one >= k:\n print(1)\nelif "1" not in n:\n print(n[0])', 's = input()\nk = int(input())\nnum = 0\nfor i in s:\n if i == "1":\n num +=1\n if num == k:\n print(1)\n exit()\n else:\n print(i)\n exit()']
['Runtime Error', 'Accepted']
['s990660835', 's373206558']
[2940.0, 3060.0]
[17.0, 19.0]
[226, 184]
p03282
u252964975
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S=input()\nK=int(input())\n\nprint(S[0])', "S=input()\nK=int(input())\n\none = True\nfor i in range(K):\n one = one and S[i]=='1'\n if not one:\n print(S[i])\n break\nif one:\n print(1)"]
['Wrong Answer', 'Accepted']
['s633478432', 's070096454']
[2940.0, 2940.0]
[18.0, 17.0]
[37, 140]
p03282
u253209284
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['for i,n in enumerate(int(input())):\n if n!= 1:\n break\nprint(n if i<int(input()) else 1)', 'for i,n in enumerate(int(input())):\n if n!= 1:\n break\nprint(n if i<input() else 1)', 'for i,n in enumerate(input()):\n if n!= 1:\n break\nprint(n if i<int(input()) else 1)', 'S = input()\nK = input()\nfor i,n in enumerate(S):\n if n!= 1:\n break\nprint(n if i<K else 1)', "for i,n in enumerate(input()):\n if n!= '1':\n break\nprint(n if i<int(input()) else 1)"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s189238426', 's647363712', 's772303238', 's996155361', 's681033076']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0, 17.0]
[91, 86, 86, 93, 88]
p03282
u253952966
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nday = 5 * (10 ** 15)\n\nfor c in s:\n i = int(c)\n l = i ** day\n if k <= l:\n print(c)\n exit()\n else:\n k -= l', "s = input()\nk = int(input())\n\nfor c in s:\n if c != '1':\n print(c)\n exit()\n else:\n k -= 1\n if k == 0:\n print(1)\n exit()\nprint(1)"]
['Time Limit Exceeded', 'Accepted']
['s640591291', 's006081290']
[197060.0, 2940.0]
[2105.0, 18.0]
[146, 151]
p03282
u254086528
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = list(input())\nk = int(input())\n\nfor w in s:\n if w != 1:\n print(w)\n break', 's = input()\nk = int(input())\n\nfor w in s:\n if w == "1":\n k -= 1\n if k == 0:\n print(1)\n break\n else:\n print(int(w))\n break\n ']
['Wrong Answer', 'Accepted']
['s803980276', 's954530909']
[2940.0, 2940.0]
[17.0, 17.0]
[93, 186]
p03282
u266569040
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = list(input())\nK = int(input())\nS = [int(i) for i in S]\nif K == 1 or len(S)==1:\n print(S[0])\nelse:\n if S[0] == 1:\n print(1)\n else:\n print(S[0])', 'S = input().split()\nK = int(input())\nS = [int(i) for i in S]\nif S[0] == 1:\n print(S[1])\nelse:\n print(S[0])', 'import sys\nS = list(input())\nK = int(input())\nS = [int(i) for i in S]\ncount = 0\nfor i in range(K):\n if S[i] is not 1:\n print(S[i])\n sys.exit()\n else:\n count+= 1\nif count == K:\n print(1)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s773194014', 's868756688', 's289254753']
[3060.0, 3316.0, 3060.0]
[17.0, 21.0, 17.0]
[169, 112, 215]
p03282
u268318377
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = [int(s) for s in input()]\nK = int(input())\nif len(S) >= K and S[K-1] == 1:\n print(1)\nelse: \n for k, s in enumerate(S, start=1):\n if s == 1:\n print(1)\n break\n else:\n print(s)\n break', 'S = [int(s) for s in input()]\nK = int(input())\nif set(S[:K]) == {1}:\n print(1)\nelse:\n for i in S:\n if i != 1:\n print(i)\n break']
['Wrong Answer', 'Accepted']
['s335760863', 's237750984']
[3060.0, 2940.0]
[17.0, 17.0]
[251, 161]
p03282
u272557899
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n \ns = list(s)\nv = 5 * 10**15\na = []\nfor i in range(9):\n a.append(i ** v)\n\nnuar = []\nlear = []\nco = 0\nrear = 0\n\nfor i in s:\n for j in range(1,10):\n if int(i) == j:\n nuar.append(j)\n rear += a[j - 1]\n lear.append(rear)\n \nfor p in range(len(s)):\n if p == 0:\n if lear[p] >= k:\n print(nuar[p])\n elif lear[p] >= k and lear[p - 1] < k:\n print(nuar[p])\n \n ', 's = input()\nk = int(input())\n \ns = list(s)\n\nco = 1\n \nfor i in s:\n if int(i) == 1:\n if co == k:\n print(int(i))\n break\n else:\n print(int(i))\n break\n co += 1\n \n \n']
['Time Limit Exceeded', 'Accepted']
['s871539266', 's538789751']
[197052.0, 2940.0]
[2106.0, 17.0]
[415, 187]
p03282
u283220417
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nans = ""\n\nif int(S[0]) > 1:\n ans = S[0]\nelif K>=100:\n for i in range(len(S)):\n if int(S[i]) > 1:\n ans = S[i]\n break\n elif i==S-1:\n ans = 1\nelse:\n for i in range(len(S)):\n if int(S[i]) > 1:\n if i+1 <= K:\n ans = S[i]\n break\n else:\n ans = 1\n break\n elif i==S-1:\n ans = 1\nprint(ans)', 'S = input()\nK = int(input())\nans = 1\n\nfor i in range(len(S)):\n if int(S[i]) == 1:\n continue\n else:\n if i+1 <= K:\n ans = S[i]\n break\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s360018725', 's605685965']
[3064.0, 2940.0]
[17.0, 17.0]
[380, 161]
p03282
u284102701
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s = input()\nk = int(input())\nidx = 0\nwhile idx < len(s) and s[idx] == '1':\n idx += 1\nif k < idx or k == len(s):\n print(1)\nelse:\n print(s[idx])\n", "s = input()\nk = int(input())\nidx = 0\nwhile idx < len(s) and s[idx] == '1':\n idx += 1\nif k <= idx or idx == len(s):\n print(1)\nelse:\n print(s[idx])\n"]
['Wrong Answer', 'Accepted']
['s268697247', 's477238493']
[3060.0, 2940.0]
[19.0, 18.0]
[152, 155]
p03282
u288430479
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nm = 0\nfor i in s:\n if i==1:\n m += 1\n else:\n break\nif m>=k:\n print(1)\nelse:\n for i in s:\n if i!=1:\n print(i)\n break', 's = input()\nk = int(input())\nm = 0\nfor i in s:\n if i==\'1\':\n m += 1\n else:\n break\nif m>=k:\n print(1)\nelse:\n for i in s:\n if i!="1":\n print(i)\n break\n else:\n continue']
['Wrong Answer', 'Accepted']
['s511005216', 's944385884']
[2940.0, 2940.0]
[17.0, 18.0]
[166, 195]
p03282
u288948615
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = list(input().split())\n\nif S[0] == '1':\n print(S[1])\nelse:\n print(S[0])", "def func(N, K):\n for n in range(len(N)):\n if N[n] != '1':\n if K > n:\n return N[n]\n return 1\n\nprint(func(input(), int(input())))"]
['Runtime Error', 'Accepted']
['s517268726', 's662842983']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 166]
p03282
u294385082
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nsumtmp = 0\n\nfor i in s:\n sumlen += int(i)**(5 * (10)**15)\n if sumtmp >= k:\n print(i)', "s = list(input())\nk = int(input())\ncoun= 0\n\nfor i in range(k):\n coun += 1\n if s[i] != '1':\n print(i)\n exit()\n if coun == 100:\n print(1)\n exit()\n \n ", "s = list(input())\nk = int(input())\n\nif s[0] == '1' and len(s) == 1:\n print(s[0])\nif s[0] == '1' and s[:k] == ['1']*k and len(s) != 1:\n print(s[1])\nelif s[0]!='1':\n print(s[0])", "s = list(input())\nk = int(input())\n\nif s[0] == '1' and len(s) == 1:\n print(s[0])\nif s[0] == '1' and s[:k] == ['1']*k:\n print(s[1])\nelif s[0]!='1':\n print(s[0])", "s = list(input())\nk = int(input())\ncoun= 0\n\nif k <= 100:\n for i in range(k):\n coun += 1\n if s[i] != '1':\n print(s[i])\n exit()\n if coun == k:\n print(1)\n exit()\nelse:\n for i in range(k):\n coun += 1\n if s[i] != '1':\n print(s[i])\n exit()\n if coun == 100:\n print(1)\n exit()\n "]
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s100533212', 's195622065', 's228387646', 's331529803', 's787639041']
[2940.0, 2940.0, 3060.0, 3060.0, 3064.0]
[18.0, 17.0, 18.0, 17.0, 17.0]
[118, 166, 178, 162, 331]
p03282
u297651868
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=list(input())\nk=int(input())\nfor i in s:\n ans=i\n if i!=2:\n break\nprint(ans)', 's=list(input())\nk=int(input())\ntmp=0\nfor i in s:\n ans=i\n if ans!="1":\n break\n else:\n tmp+=1\nif tmp>=k:\n print("1")\nelse:\n print(ans)']
['Wrong Answer', 'Accepted']
['s807984141', 's007727263']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 161]
p03282
u305965165
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nfor i in range( min(len(s),k) ):\n if s[i] != "1":\n print(s[i])\n\nprint("1")', 's = input()\nk = int(input())\n\nresult = "1"\nfor i in range( min(len(s),k) ):\n if s[i] != "1":\n result = s[i]\n \nprint(result)', 's = input()\nk = int(input())\n\nresult = "1"\nfor i in range( min(len(s),k) ):\n if s[i] != "1":\n result = s[i]\n break\n \nprint(result)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s109326219', 's497077966', 's641832168']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[114, 140, 154]
p03282
u306412379
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nK = int(input())\n\nif S[0] == '1':\n count = 0\n while S[i] == '1':\n count += 1\n if count >= K:\n print(1)\n else:\n print(S[count])\nelse:\n print(S[0])", "S = input()\nK = int(input())\ncount = 0\n\nif S[0] != '1':\n print(S[0])\n exit()\n\nfor i in range(len(S)):\n if S[i] == '1':\n count += 1\n else:\n break\n\nif count >= K:\n print(1)\nelse:\n print(S[count])"]
['Runtime Error', 'Accepted']
['s718727527', 's260790312']
[9172.0, 8940.0]
[29.0, 28.0]
[172, 213]
p03282
u315485238
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['N=int(input())\nK=int(input())\n\nif K==1:\n print(N[0])\n \nelse:\n if N[0]==1:\n print(N[1])\n else:\n print(N[0])', "N=input()\nK=int(input())\n\nfor x in N[:min(len(N), K)]:\n if x=='1':\n pass\n else:\n print(x)\n break\nelse:\n print('1')"]
['Runtime Error', 'Accepted']
['s490087817', 's965225214']
[2940.0, 2940.0]
[17.0, 17.0]
[116, 126]
p03282
u318024671
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['numstr = input()\nnum = int(input())\ndef check():\n for i in range(len(numstr)):\n if numstr[i] != 1:\n return numstr[i]\nprint(check())\n \n', 'numstr = input()\nnum = int(input())\ndef check():\n infinity = ""\n for i in range(num):\n if numstr[i] is not "1":\n infinity = infinity + numstr[i]\n return infinity\n else:\n infinity = infinity + "1"\n return "1"\ninfinity = check()\nprint(infinity[len(infinity)-1])\n \n']
['Wrong Answer', 'Accepted']
['s925430740', 's717961072']
[2940.0, 2940.0]
[17.0, 18.0]
[162, 325]
p03282
u319684393
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["inp1 = input()\ninp1 = list(inp1)\ninp2 = input()\n\nans = 1\nfor i in inp1:\n if i != '1'\n ans = int(i)\n break\n\nprint(ans)", "inp1 = input()\ninp1 = int(inp1)\ninp2 = input()\ninp2 = list(inp2)\n\nans = 1\nfor i in inp2:\n if i != '1'\n ans = int(i)\n break\n\nprint(ans)", "inp1 = input()\ninp1 = list(inp1)\ninp2 = input()\ninp2 = int(inp2)\n\nans = 1\ncount = 0\nfor i in inp1:\n if i != '1':\n ans = int(i)\n break\n else:\n count += 1\n\nif count >= inp2:\n ans = 1\n\nprint(ans)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s139713977', 's225029027', 's041587757']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[134, 151, 222]
p03282
u325282913
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nK = int(input())\nflg = False\nfor i in range(K):\n if S[i] != '1':\n flg = True\nif flg:\n print('1')\n exit()\nfor i in range(len(S)):\n if S[i] != '1':\n print(S[i])\n exit()\nprint('1')", "S = input()\nK = int(input())\nflg = True\nfor i in range(K):\n if len(S) <= i:\n break\n if S[i] != '1':\n flg = False\nif flg:\n print('1')\n exit()\nfor i in range(len(S)):\n if S[i] != '1':\n print(S[i])\n exit()\nprint('1')"]
['Runtime Error', 'Accepted']
['s163418445', 's994118703']
[3060.0, 3060.0]
[17.0, 17.0]
[222, 256]
p03282
u327668449
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nans_idx = 0\n\nfor i in range(k):\n if (s[ans_idx] != "1"):\n break\nprint(s[ans_idx])', 's = input()\nk = int(input())\n\nans_idx = 0\n\ns = list(s)\nfor i in range(min(k, len(s))):\n if (s[i] != "1"):\n break\nprint(s[i])']
['Wrong Answer', 'Accepted']
['s178254490', 's410234974']
[2940.0, 3060.0]
[2104.0, 19.0]
[115, 128]
p03282
u328131364
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = list(input())\nK = int(input())\ni = 0\nans = 0\n\nwhile K > 0:\n K = K - S[i]**(5*10**16 + 1)\n ans = S[i]\n i += 1\n\nprint(ans)', 'S = input()\nK = int(input())\n\nans = 0\nn1 = 0\n\nfor i in S:\n if i != "1":\n s = int(i)\n break\n \n else:\n n1 += 1\n\nif n1 >= K:\n print(1)\n\nelse:\n print(s)']
['Runtime Error', 'Accepted']
['s621806009', 's456903919']
[2940.0, 2940.0]
[18.0, 18.0]
[133, 184]
p03282
u328364772
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nk = input()\n\nif S[0] == '1':\n cnt = 0\n for s in S:\n if s == '1':\n cnt += 1\n else:\n not1 = s\n break\n if k <= cnt:\n print(1)\n else:\n print(not1)\nelse:\n print(S[0])\n", "S = input()\nk = int(input())\n\nif S[0] == '1':\n cnt = 0\n for s in S:\n if s == '1':\n cnt += 1\n else:\n not1 = s\n break\n if k <= cnt:\n print(1)\n else:\n print(not1)\nelse:\n print(S[0])\n"]
['Runtime Error', 'Accepted']
['s819513687', 's198243549']
[2940.0, 2940.0]
[17.0, 17.0]
[250, 255]
p03282
u329709276
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\n\nfor i in S:\n if i == 1:\n K -= 1\n if K == 0:\n print(1)\n break\n else:\n print(i)\n break', "S = input()\nK = int(input())\n\nfor i in S:\n if i == '1':\n K -= 1\n if K == 0:\n print(1)\n break\n else:\n print(i)\n break"]
['Wrong Answer', 'Accepted']
['s296247768', 's132263563']
[2940.0, 2940.0]
[17.0, 17.0]
[170, 172]
p03282
u331381193
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=str(input())\nk=int(input())\n\nres=''\n\nif len(s)>=k:\n\tfor i in range(k):\n\t\tif s[i]!=1:\n\t\t\tres=s[i]\t\t\t\n\t\t\tbreak\n\t\tif i==k-1:\n\t\t\tres='1'\nelse:\n\tfor i in range(len(s)):\n\t\tif s[i]!='1':\n\t\t\tres=s[i]\n\t\t\tbreak\n\nprint(res)", "s=str(input())\nk=int(input())\n\nres=''\n\nif len(s)>=k:\n\tfor i in range(k):\n\t\tif s[i]!=1:\n\t\t\tres=s[i]\t\t\t\n\t\t\tbreak\n\t\tif i==k:\n\t\t\tres='1'\nelse:\n\tfor i in range(len(s)):\n\t\tif s[i]!='1':\n\t\t\tres=s[i]\n\t\t\tbreak\n\nprint(res)", "s=str(input())\nk=int(input())\n\nres=''\n\nif len(s)>=k:\n\tfor i in range(k):\n\t\tif s[i]!='1':\n\t\t\tres=s[i]\t\t\t\n\t\t\tbreak\n\t\tif i==k-1:\n\t\t\tres='1'\nelse:\n\tfor i in range(len(s)):\n\t\tif s[i]!='1':\n\t\t\tres=s[i]\n\t\t\tbreak\n\nprint(res)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s171660096', 's419601001', 's725028886']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[214, 212, 216]
p03282
u332253305
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=input()\nn=int(input())\n\nfor i in range(n):\n if s[i]!='1':\n print(s[i])\n break\n else:\n print(1)\n", "s=input()\nn=int(input())\nans=1\nfor i in range(n):\n if s[i]!='1':\n ans=s[i]\n break\n else:\n continue\nprint(ans)\n \n"]
['Wrong Answer', 'Accepted']
['s896905363', 's731726995']
[2940.0, 2940.0]
[17.0, 17.0]
[124, 145]
p03282
u337626942
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\n\nif k==1:\n print(int(s[0]))\n\nelif int(s[0])==1:\n\n if len(s)<k:\n num=1\n for i in range(1, len(s)):\n if int(s[i])!=1:\n num=int(s[i])\n break\n print(num)\n\n else:\n if s[:k]=="1"*k:\n print(1)\n\nelif int(s[0])!=1:\n print(int(s[0]))', 's=input()\nk=int(input())\n\ncnt=0\nfor i in range(len(s)):\n if s[i]=="1":\n cnt+=1\n else:\n ans_index=i\n break\n\nif k<=cnt:\n print(1)\nelse:\n print(s[ans_index])']
['Wrong Answer', 'Accepted']
['s546790645', 's425537205']
[3064.0, 3060.0]
[17.0, 17.0]
[340, 187]
p03282
u340010271
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S=input()\nK=int(input())\nif S[0]!='1':\n print(S[0])\nelse:\n for i in range(len(S)):\n if S[i]!='1':\n if K<=i:\n print('1'):\n else:\n print(S[i])\n break", "S=input()\nK=int(input())\nif S[0]!='1':\n print(S[0])\nelse:\n for i in range(len(S)):\n if S[i]!='1':\n if K<=i:\n print('1')\n else:\n print(S[i])\n break\n print(1)", "S=input()\nK=int(input())\nif S[0]!='1':\n print(S[0])\nelse:\n flag=True\n for i in range(len(S)):\n if S[i]!='1':\n if K<=i:\n print('1')\n else:\n print(S[i])\n flag=False\n break\n if flag:\n print(1)"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s555081592', 's679593420', 's685886139']
[2940.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[223, 235, 289]
p03282
u347184682
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["#include <bits/stdc++.h>\n// \n\n#include <algorithm>\n#include <string>\n#include <math.h>\nusing namespace std;\ntypedef long long ll;\n\n#define rep(i,n) for(int i=0;i<n;i++)\n#define rep2(i,a,b) for(int i=(a);i<(b);i++)\n\ntemplate<class T> inline void chmin(T& a, T b) {if (a > b) a = b;}\ntemplate<class T> inline void chmax(T& a, T b) {if (a < b) a = b;}\n\n\nint main() {\n string s;cin >> s;\n int k;cin >> k;\n rep(i,k+3){\n if (s[i]!='1'){\n cout<<s[i]<<endl;\n return 0;\n }\n }\n cout<<1<<endl; \n}\n", 'import sys\ns=input()\nk=int(input())\nfor i in range(k):\n if s[i]!="1":\n print(s[i])\n sys.exit()\nprint(1)\n']
['Runtime Error', 'Accepted']
['s780550555', 's194651057']
[3060.0, 2940.0]
[17.0, 17.0]
[544, 111]
p03282
u347545486
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = int(input())\nk = int(input())\nli = [int(k) for k in list(str(s))]\n#print(li)\nif k = 1:\n print(li[0])\nelse:\n print(li[1])', 's = int(input())\nk = int(input())\nli = [int(k) for k in list(str(s))]\n#print(li)\ncount = 0\nfor i in li:\n if i ==1:\n count+=1\n else:\n ans = i\n break\n \nif k <= count:\n print(1)\nelse:\n print(ans)']
['Runtime Error', 'Accepted']
['s658439044', 's362178507']
[2940.0, 3060.0]
[17.0, 17.0]
[126, 208]
p03282
u348868667
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nif S[0]*len(S) == S and S[0] == "1":\n print("1")\nelse:\n ans = 0\n ind = 0\n for i in range(len(S)):\n if S[i] != "1":\n ans = S[i]\n ind = i+1\n if ind > K:\n print("1")\n else:\n print(ans)', 'S = input()\nK = int(input())\nif S[0]*len(S) == S:\n print("1")\nelse:\n ans = 0\n ind = 0\n for i in range(len(S)):\n if S[i] != "1":\n ans = S[i]\n ind = i+1\n if ind > K:\n print("1")\n else:\n print(ans)', 'S = input()\nK = int(input())\nif S[0]*len(S) == S and S[0] == "1":\n print("1")\nelse:\n ans = 0\n ind = 0\n for i in range(len(S)):\n if S[i] != "1":\n ans = S[i]\n ind = i+1\n break\n if ind > K:\n print("1")\n else:\n print(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s216760854', 's284111299', 's120121295']
[3060.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[271, 255, 289]
p03282
u352676541
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nK = int(input())\n\nans = 1\nfor i in S:\n\tprint(i,K)\n\tif i > '1':\n\t\tans = i\n\tif K==1:\n\t\tans = i\n\t\tbreak\n\tK-=1\nprint(ans)", "S = input()\nK = int(input())\n\nans = 1\nfor i in S:\n\tprint(i,K)\n\tif i > '1':\n\t\tans = i\n\t\tbreak\n\tif K==1:\n\t\tans = i\n\t\tbreak\n\tK-=1\nprint(ans)", "S = input()\nK = int(input())\n\nans = 1\nfor i in S:\n\tprint(i,K)\n\tif i != '1':\n\t\tans = i\n\t\tbreak\n\tif K==1:\n\t\tans = i\n\t\tbreak\n\tK-=1\nprint(ans)", "S = input()\nK = int(input())\n\nans = 1\nfor i in S:\n\tif i != '1':\n\t\tans = i\n\t\tbreak\n\tif K==1:\n\t\tans = i\n\t\tbreak\n\tK-=1\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s116758349', 's163180636', 's483601270', 's105693698']
[9048.0, 9072.0, 9012.0, 9052.0]
[27.0, 25.0, 24.0, 31.0]
[129, 137, 138, 126]
p03282
u359474860
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nif S[0] != "1":\n print(S[0])\nelse:\n i = 0\n count = 0\n for i in range(len(S)):\n if S[i] == "1":\n count += 1\n i += 1\n if K <= count:\n print(1)\n else:\n print(S[i])', 'S = input()\nK = int(input())\n\n\nif S[0] != "1":\n print(S[0])\nelse:\n i = 0\n count = 0\n while i < len(S) and S[i] == "1":\n count += 1\n i += 1\n if K <= count:\n print(1)\n else:\n print(S[i])']
['Runtime Error', 'Accepted']
['s206799237', 's207937397']
[3060.0, 3060.0]
[18.0, 19.0]
[250, 230]
p03282
u359747364
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = str(input())\n k = int(input())\n for i in s:\n if i != "1":\n print(i)\n break', 's = str(input())\nk = int(input())\ncounter = 0\nfor i in range(k):\n if i != "1" and i <= k-1:\n print(i)\n counter += 1\n break\nif counter == 0:\n print(1)', "S = input()\nK = int(input())\n \nif K == 1:\n print(S[0])\n exit()\nelse:\n for i in range(K):\n if S[i] != '1':\n print(S[i])\n exit()\nprint(1)"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s318668938', 's784415287', 's287676574']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[133, 176, 173]
p03282
u361826811
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = readline().decode().strip()\nK = int(readline())\ncnt = 0\nans = 0\nif K <= len(N):\n ans = N[K - 1]\nelse:\n for i in N:\n if i == '1':\n continue\n else:\n ans = i\n break\n\nprint(ans)\n", "import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = readline().decode().strip()\nK = int(readline())\ncnt = 0\nans = 0\nfor i in N:\n if len(N):\n ans = N[0]\n break\n if i == '1':\n cnt += 1\n continue\n else:\n if int(i) * 5000 * 10 ** 12 + cnt >= K:\n ans = i\n break\n else:\n ans = N[N.find(i) + 1]\n break\n\nprint(ans)\n", "import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = readline().decode().strip()\nK = int(readline())\nans = 1\nfor i in range(K):\n if i != '1':\n ans = i\n break\n\nprint(ans)\n", "import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = readline().decode().strip()\nK = int(readline())\nans = 1\nfor i in range(K):\n if N[i] != '1':\n ans = N[i]\n break\n\nprint(ans)\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s416257342', 's443944002', 's757229978', 's845063916']
[12388.0, 12504.0, 12404.0, 18360.0]
[149.0, 151.0, 149.0, 255.0]
[385, 508, 292, 298]
p03282
u362560965
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['# S = input()\n# K = int(input())\n\nS = "9999"\nK = 1\n\nans = 1\n\nfor i in range(len(S)):\n if int(S[i]) == 1:\n pass\n else:\n ans = int(S[i])\n ones = i\n break\n\nif not ones:\n ans = 1\nelif K <= ones:\n ans = 1\n\nprint(ans)\n', 'S = input()\nK = int(input())\n\nans = 1\n\nfor i in S:\n if int(i) == 1:\n pass\n else:\n ans = int(i)\n\nprint(ans)\n', 'S = input()\nK = int(input())\n\nans = 1\n\nfor i in range(K):\n if S[i] == 1:\n pass\n else:\n ans = S[i]\n\nprint(ans)\n', 'S = input()\nK = int(input())\n\nans = 1\n\nfor i in range(K):\n if int(S[i]) == 1:\n pass\n else:\n ans = int(S[i])\n break\n\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s382202799', 's878118010', 's979363206', 's339404847']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[252, 127, 130, 154]
p03282
u365993347
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = input()\n\nlst = []\ni = int(S)\nwhile i > 0:\n lst.append(i%10)\n i //= 10 \nlst.reverse()\nprint(lst[0])\nif K == 1:\n print(lst[0])\nelse:\n if lst[0] == 1:\n print(lst[1])\n else:\n print(lst[0])', "S = int(input())\nK = int(input())\n\nlst = []\nwhile S > 0:\n lst.append(S%10)\n S //= 10 \nlst.reverse()\n#print(lst[0])\nj = 0\nn = 0\nwhile lst[j] == 1:\n n = j+1\n j += 1\nprint('n =',n)\nif K <= n:\n print(1)\nelse:\n print(lst[n])", "S = int(input())\nK = int(input())\n\nlst = [100]\nwhile S > 0:\n lst.append(S%10)\n S //= 10 \nlst.reverse()\nprint(lst)\nj = 0\nn = 0\nwhile lst[j] == 1:\n n = j+1\n j += 1\n#print('n =',n)\nif K <= n:\n print(1)\nelse:\n print(lst[n])", "S = int(input())\nK = int(input())\n\nlst = [0]*100\nwhile S > 0:\n lst.append(S%10)\n S //= 10 \nlst.reverse()\n#print(lst)\nj = 0\nn = 0\nwhile lst[j] == 1:\n n = j+1\n j += 1\n#print('n =',n)\nif K <= n:\n print(1)\nelse:\n print(lst[n])"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s225800117', 's405886957', 's817427346', 's735930637']
[3060.0, 3064.0, 3064.0, 3064.0]
[18.0, 18.0, 17.0, 17.0]
[237, 245, 245, 248]
p03282
u366185462
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"ABC106C-ToInfinity.ipynb","provenance":[],"authorship_tag":"ABX9TyNX8Ir2ZzuscRLajj/o6IUg"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"3ke4UMpfQZna","colab_type":"code","outputId":"b7f58493-9947-42d9-8953-9dfad87c6dad","executionInfo":{"status":"ok","timestamp":1589608511500,"user_tz":-540,"elapsed":5594,"user":{"displayName":"Taishi","photoUrl":"","userId":"11736711679866118393"}},"colab":{"base_uri":"https://localhost:8080/","height":72}},"source":["s = str(input())\\n","k = int(input())\\n","if int(s[0]) == 1:\\n"," print(s[1])\\n","else:\\n"," print(s[0])"],"execution_count":3,"outputs":[{"output_type":"stream","text":["3\\n","157\\n","3\\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"G05wyz9VTQI9","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":35},"outputId":"8368a8c5-f413-4a10-c257-1f3791af6cf0","executionInfo":{"status":"ok","timestamp":1589608502261,"user_tz":-540,"elapsed":575,"user":{"displayName":"Taishi","photoUrl":"","userId":"11736711679866118393"}}},"source":["3\\n","157"],"execution_count":2,"outputs":[{"output_type":"execute_result","data":{"text/plain":["157"]},"metadata":{"tags":[]},"execution_count":2}]},{"cell_type":"code","metadata":{"id":"TmcZoyerDNFs","colab_type":"code","colab":{}},"source":[""],"execution_count":0,"outputs":[]}]}', '{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"ABC106C-ToInfinity.ipynb","provenance":[],"authorship_tag":"ABX9TyNRoFVf941vEvQ2RLhFUphc"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"code","metadata":{"id":"3ke4UMpfQZna","colab_type":"code","colab":{"base_uri":"https://localhost:8080/","height":72},"outputId":"99180d89-276e-4fd8-b2c6-02e5a651ee14","executionInfo":{"status":"ok","timestamp":1589596953669,"user_tz":-540,"elapsed":15115,"user":{"displayName":"Taishi","photoUrl":"","userId":"11736711679866118393"}}},"source":["s = str(input())\\n","k = int(input())\\n","i = 0\\n","n = s[0]\\n","while (i < len(s)):\\n"," if int(s[i]) ** 2 >= k:\\n"," n = s[i]\\n"," break\\n"," else:\\n"," k -= int(s[i])\\n"," i += 1\\n","print(n)"],"execution_count":17,"outputs":[{"output_type":"stream","text":["299792458\\n","9460730472580800\\n","2\\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"id":"G05wyz9VTQI9","colab_type":"code","colab":{}},"source":["299792458\\n","9460730472580800"],"execution_count":0,"outputs":[]}]}', "s = str(input())\nk = int(input())\ni, count = 0, 0\nwhile (i < len(s)):\n if int(s[i]) == 1:\n if (count >= k - 1):\n print('1')\n break\n count += 1\n else:\n print(s[i])\n break\n i += 1"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s791404722', 's913725096', 's937492919']
[3064.0, 3064.0, 3060.0]
[17.0, 17.0, 19.0]
[1434, 1078, 202]
p03282
u366959492
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\nc=0\nif k<=len(s):\n print(s[k-1])\n exit()\nfor i in range(len(s)):\n if s[i]=="1":\n continue\n else:\n print(s[i])\n break\n', 's=input()\nk=int(input())\nc=0\nfor i in range(len(s)):\n if s[i]=="1":\n if k-1==i:\n print(1)\n break\n continue\n else:\n print(s[i])\n break\n']
['Wrong Answer', 'Accepted']
['s740451767', 's601511171']
[2940.0, 2940.0]
[17.0, 18.0]
[175, 190]
p03282
u367130284
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['try:print([i for i in input()[:int(input())]][0])\nexcept:print(1)', 'print(max(1,input()[:int(input())].replace("1","")[:1]))', 's=input()\nk=int(input())\nfor i in range(k):\n if s[i] !="1":\n print(s[i])\n break\nprint("1")', "print(1or input()[:int(input())].replace('1','')[:1])", 's=input()\nk=int(input())\nfor i in s[:k]:\n if i!="1":\n print(i)\n exit()\nprint(1)\n']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s436848269', 's499893301', 's674766256', 's730643885', 's117257589']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 19.0, 18.0, 17.0, 17.0]
[65, 56, 107, 53, 97]
p03282
u369752439
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['def reflesh_string(current_answer):\n index = min(K, len(current_answer))\n return current_answer[:index]\n \ndef update_string(string_answer):\n string_answer = string_answer.replace("1", "1")\n string_answer = string_answer.replace("2", "22")\n string_answer = string_answer.replace("3", "333")\n string_answer = string_answer.replace("4", "4444")\n string_answer = string_answer.replace("5", "55555")\n string_answer = string_answer.replace("6", "666666")\n string_answer = string_answer.replace("7", "7777777")\n string_answer = string_answer.replace("8", "88888888")\n string_answer = string_answer.replace("9", "999999999")\n return string_answer\n \ndef check_skip(current_answer):\n for i in range(2, 10):\n i = str(i)\n if(i in current_answer):\n return False\n return True\n \nS = input().strip()\nK = int(input().strip())\nfor c in range(5 * 10**15):\n S = update_string(S)\n S = reflesh_string(S)\n if(check_skip(S)):\n break\nprint(S[K-1])', 'S = input().strip()\nK = int(input().strip())\n\nans = 1\nfor i in range(min(K, len(S))):\n if(S[i] != "1"):\n ans = S[i]\n break\n \nprint(ans)']
['Time Limit Exceeded', 'Accepted']
['s832429728', 's341384198']
[686736.0, 2940.0]
[2106.0, 17.0]
[1008, 159]
p03282
u371132735
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nans = "1"\nfor i in range(K):\n if S[i] != "1":\n ans = i\n break\nprint(ans)', 'S = input()\nK = int(input())\nans = "1"\nfor i in range(len(S)):\n if i >= K:\n break\n if S[i] != "1":\n ans = S[i]\n break\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s365199836', 's180612142']
[2940.0, 2940.0]
[17.0, 18.0]
[108, 140]
p03282
u371595076
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nK = input()\n\nfor i, k in enumerate(range(int(K))):\n if S[k] != '1':\n print(S[k])\n break\n if i == len(K)-1:\n print('1')", 'import math\n\nS = input()\nK = int(input())\n\nps = []\n\nfor s in S:\n i = int(s)\n if(i == 1):\n p == -1\n else:\n p = 5*(10**15) * math.log2(i)\n ps.append(p)\n\nsum = 0\nindex = 0\nfor p in ps:\n if not p == -1:\n sum += p\n else:\n K -= 1\n \n if math.log2(K) < sum:\n print(S[index])\n break\n \n index += 1', '# import math\n\nS = input()\nK = int(input())\n\nps = []\n\nfor s in S:\n i = int(s)\n if(i == 1):\n p = -1\n else:\n p = 5*(10**15) * math.log2(i)\n ps.append(p)\n\nsum = 0\nindex = 0\n \nif K == 1:\n print(S[0])\nelse:\n for p in ps:\n\n if not p == -1:\n sum += p\n else:\n K -= 1\n\n if math.log2(K) < sum:\n #print(index)\n print(S[index])\n break\n index += 1\n\n', "S = input()\nK = int(input())\n\nfor i, k in enumerate(range(K)):\n if S[k] != '1':\n print(S[k])\n break\n if i == K - 1:\n print('1')"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s036356918', 's558009362', 's959192287', 's768658426']
[2940.0, 3064.0, 3064.0, 2940.0]
[19.0, 19.0, 17.0, 22.0]
[157, 367, 454, 154]
p03282
u371763408
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\nif s[0]=="1":\n try:\n if s[k-1]=="1":\n print(\'1\')\n else:\n print(s[s.rfind("1")+1])\n except IndexError:\n try:\n print(s[s.rfind("1")+1])\n except IndexError:\n print(s[-1])\nelse:\n print(s[0])\n\n\n', 's=input()\nk=int(input())\nif s[0]=="1":\n if k>len(s):\n for i in s:\n if i!="1":\n print(i)\n else:\n print(s[k-1])\nelse:\n print(s[0])', 's=input()\nk=int(input())\nif s[0]=="1":\n try:\n if s[k-1]=="1":\n print(\'1\')\n else:\n print(s[s.rfind("1")+1])\n except IndexError:\n try:\n print(s[s.rfind("1")+1])\n except IndexError:\n print(s[s.rfind("1")])\nelse:\n print(s[0])\n\n\n', 's=input()\nk=int(input())\nif s[0]=="1":\n try:\n if s[k-1]=="1":\n print(\'1\')\n else:\n print(s[s.rfind("1")+1])\n except IndexError:\n print(s[s.rfind("1")+1])\nelse:\n print(s[0])\n', 's=input()\nk=int(input())\nfor i in range(k):\n if s[i]!="1":\n print(s[i])\n exit()\nprint("1")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s159154459', 's362417547', 's488459828', 's590965033', 's716379404']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 18.0, 17.0]
[249, 149, 259, 194, 98]
p03282
u375616706
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s = input()\nk = (int)(input())\n\nif k <= 5000000000000000:\n for n in s:\n if k == 0:\n print(n)\n elif n == '1':\n k = k-1\n else:\n print(n)\n\nelse:\n for n in s:\n if n == '1':\n k = k-1\n elif n == '2':\n if k >= 2ae0i0:\n else:\n print(n)\n else:\n print(n)\n", "s = input()\nk = (int)(input())\n\nfor n in s:\n if k < 0:\n print(s[s.index(n)-1])\n elif n == '1':\n k = k-1\n else:\n print(n)\n", "s = input()\nk = (int)(input())\n\nif k <= 5000000000000000:\n for n in s:\n if k == 0:\n print(s[s.index(n)-1])\n elif n == '1':\n k = k-1\n else:\n print(n)\n\nelse:\n for n in s:\n if n == '1':\n k = k-1\n elif n == '2':\n if k >= 10**15:\n print()\n else:\n print(n)\n else:\n print(n)\n", "s = input()\nk = (int)(input())\n\nc = 0\nfor ch in s:\n if not ch == '1':\n break\n c += 1\nn = s[c] if c < len(S) else None\na = n if n and c < K else S[0]\nprint(a)\n", "s = input()\nK = (int)(input())\nk = K\nfor n in s:\n if k == 0:\n print(n)\n elif n == '1':\n k = k-1\n else:\n print(n)\nif k == 0:\n print(s[K-1])\n", "s = input()\nk = (int)(input())\n\nfor n in s:\n if k == 0:\n print(s[s.index(n)-1])\n elif n == '1':\n k = k-1\n else:\n print(n)\n", "s = input()\nk = (int)(input())\n\nc = 0\nfor c in s:\n if not c == '1':\n break\n c += 1\nn = s[c] if c < len(S) else None\na = n if n and c < K else S[0]\nprint(a)\n", "s = input()\nk = (int)(input())\n\nc = 0\nfor ch in s:\n if not ch == '1':\n break\n c += 1\nn = s[c] if c < len(s) else None\na = n if n and c < k else s[0]\nprint(a)\n"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s092106337', 's172045339', 's231445746', 's416359753', 's484234081', 's633992502', 's724433705', 's354655721']
[2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 17.0, 18.0, 18.0, 18.0, 17.0]
[305, 133, 337, 163, 152, 134, 161, 163]
p03282
u375695365
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s=int(input())\nk=int(input())\n\nfor i in range(min(len(str(s),k))):\n if str(s)[i]!='1':\n print(str(s)[i])\n exit()\nprint(1)\n ", "s=int(input())\nk=int(input())\n\nfor i in range(min(len(str(s),k)):\n if str(s)[i]!='1':\n print(str(s)[i])\n exit()\nprint(1)\n ", "s=int(input())\nk=int(input())\n\nfor i in range(min(len(str(s)),k)):\n if str(s)[i]!='1':\n print(str(s)[i])\n exit()\nprint(1)\n "]
['Runtime Error', 'Runtime Error', 'Accepted']
['s304430073', 's466766607', 's569438073']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[142, 141, 142]
p03282
u377834804
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\n\nfor i, s in enumerate(S, 1):\n if s == 1:\n if i == K:\n print(s)\n break\n else:\n continue\n else:\n print(s)\n break', "S = input()\nK = int(input())\n \nfor i, s in enumerate(S, 1):\n if s == '1':\n if i == K:\n print(s)\n break\n else:\n continue\n else:\n print(s)\n break"]
['Wrong Answer', 'Accepted']
['s366922113', 's264017985']
[9020.0, 8760.0]
[35.0, 29.0]
[169, 172]
p03282
u382176416
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["n=list(input())\nk=int(input())\nif len(n)==1:\n print('1')\nelse:\n one_list=[]\n while len(n)!=0:\n if n[0]=='1':\n one_list.append(n.pop(0))\n else:\n break\n print(one_list)\n if k<=len(one_list):\n print('1')\n else:\n print(n[0])", "n=list(input())\nk=int(input())\nif len(n)==1:\n print('1')\nelse:\n one_list=[]\n while len(n)!=0:\n if n[0]=='1':\n one_list.append(n.pop(0))\n else:\n break\n if 0<len(one_list)<=k:\n print('1')\n else:\n print(n[0])\n\n", "n=list(input())\nk=int(input())\nif len(n)==1:\n print('1')\nelse:\n one_list=[]\n while len(n)!=0:\n if n[0]=='1':\n one_list.pop(n.pop(0))\n else:\n break\n if 0<len(one_list)<=k:\n print('1')\n else:\n print(n[0])", "n=list(input())\nk=int(input())\nif len(n)==1:\n print('1')\nelse:\n one_list=[]\n while 1==1:\n if n[0]=='1':\n one_list.pop(n.pop(0))\n else:\n break\n if 0<len(one_list)<=k:\n print('1')\n else:\n print(n[0])\n\n", "n=list(input())\nk=int(input())\nif len(n)==1 and n[0]=='1':\n print('1')\nelse:\n one_list=[]\n while len(n)!=0:\n if n[0]=='1':\n one_list.append(n.pop(0))\n else:\n break\n if k<=len(one_list):\n print('1')\n else:\n print(n[0])\n\n"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s602834804', 's757344996', 's851584012', 's891759433', 's023701995']
[3060.0, 2940.0, 3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[248, 234, 229, 226, 246]
p03282
u388323466
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = list(map(int, input()))\nk = int(input())\n\nans = 1\n\nfor i in range(len(k)):\n\tif s[i] != 1:\n\t\tans = s[i]\n\t\tbreak\n\nprint(ans)\n\t\t\n\t', 's = list(map(int, input()))\nk = int(input())\n\nans = 1\n\nfor i in range(len(min(s,k))):\n\tif s[i] != 1:\n\t\tans = s[i]\n\t\tbreak\n\nprint(ans)\n\t\t\n\t', 's = list(map(int, input()))\nk = int(input())\n\nans = 1\n\nfor i in range(min(len(s),k)):\n\tif s[i] != 1:\n\t\tans = s[i]\n\t\tbreak\n\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s352169105', 's686143751', 's278708664']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[131, 138, 133]
p03282
u394721319
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["S = input()\nK = int(input())\n\nif K == 1:\n print(S[0])\n exit()\nelse:\n for i in range(K):\n if S[i] != '1':\n print(S{i})\n exit()\nprint(1)\n", "S = input()\nK = int(input())\n\nif K == 1:\n print(S[0])\n exit()\nelse:\n for i in range(K):\n if S[i] != '1':\n print(S[i])\n exit()\nprint(1)\n"]
['Runtime Error', 'Accepted']
['s150207869', 's814255343']
[2940.0, 2940.0]
[17.0, 17.0]
[173, 173]
p03282
u394731058
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["import sys\n\ninput = sys.stdin.readline\n\ndef main():\n ans = 0\n s = input()\n k = int(input())\n for i in range(len(s)):\n if s[i] != '1':\n if k > i+1:\n ans = s[i]\n else:\n ans = '1'\n print(ans)\n\nif __name__ == '__main__':\n main()", "import sys\n\ninput = sys.stdin.readline\n\ndef main():\n ans = 0\n s = input().rstrip('\\n')\n k = int(input())\n for i in range(len(s)):\n if s[i] != '1':\n if k < i+1:\n ans = s[i]\n else:\n ans = '1'\n print(ans)\n\nif __name__ == '__main__':\n main()", "import sys\n\ninput = sys.stdin.readline\n\ndef main():\n ans = ''\n index = 0\n s = input().rstrip('\\n')\n k = int(input())\n for i in range(len(s)):\n if s[i] != '1':\n ans = s[i]\n index = i\n break\n if ans == '' or k < index+1:\n ans = '1'\n print(ans)\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s023621382', 's457943451', 's815909164']
[9184.0, 9040.0, 9176.0]
[26.0, 30.0, 28.0]
[301, 314, 348]
p03282
u395086545
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\nif int(s[0]) == 1:\n one_count = 0\n i = 0\n while s[i] == 1:\n one_count += 1\n i += 1\n if k <= one_count:\n print(1)\n else:\n print(s[one_count])\nelse:\n print(s[0])\n', 's = input()\nk = int(input())\n\nif int(s[0]) == 1:\n one_count = 0\n i = 0\n while i < len(s) and int(s[i]) == 1:\n one_count += 1\n i += 1\n if k <= one_count:\n print(1)\n else:\n print(s[one_count])\nelse:\n print(s[0])\n']
['Wrong Answer', 'Accepted']
['s366449209', 's706424933']
[2940.0, 3060.0]
[17.0, 17.0]
[208, 228]
p03282
u396824275
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S=input()\nK=int(input())\nif K<=len(S):\n for s in S[:K]:\n if s!="1":\n break\n else:\n print("1")\nelse:\n\tfor s in S:\n \tif s!="1" :\n \tprint(s)\n \tbreak', 'S=input()\nK=int(input())\nif(K<=len(S)):\n for s in S[:K]:\n if s!="1":\n break\n else:\n print("1")\nelse:\n for s in S:\n if(s!="1"):\n print(s)\n break', 'N=input()\nfor count in range(len(N)): \n if N[count]!="1": break\nif int(input())>count: print(N[count])\nelse: print(1)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s100389950', 's951810612', 's401862785']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[193, 206, 130]
p03282
u397531548
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S,K=input().split()\nk=int(K)\nfor i in range(0,k):\n if S[i]!="1":\n print(S[i])\n break\nelse:\n print("1")\n', 'S=input()\nk=int(input())\nfor i in range(0,k):\n if S[i]!="1":\n print(S[i])\n break\nelse:\n print("1")\n']
['Runtime Error', 'Accepted']
['s632690864', 's145118487']
[2940.0, 3064.0]
[19.0, 19.0]
[123, 119]
p03282
u399973890
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["s = input()\nk = int(input())\nfor i in range(5*10**15):\n s = s.replace('2','22')\n s = s.replace('3','333')\n s = s.replace('4','4444')\n s = s.replace('5','55555')\n s = s.replace('6','666666')\n s = s.replace('7','7777777')\n s = s.replace('8','88888888')\n s = s.replace('9','999999999')\n s = s[:k]\nprint(s)", "s = input()\nk = int(input())\ncnt = 0\nwhile s[:1] == '1':\n s = s[1:]\n cnt +=1\nif k <= cnt:\n print('1')\nelse:\n print(s[:1])\n"]
['Time Limit Exceeded', 'Accepted']
['s139645580', 's745966674']
[493696.0, 3188.0]
[2106.0, 19.0]
[329, 134]
p03282
u401452016
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['import sys\nimport numpy as np\n\nn = int(sys.stdin.readline())\nA = list(map(int, sys.stdin.readline().split()))\n\nprint(sum(A)-n)', "import sys\n\ns = sys.stdin.readline().rstrip()\nk = int(sys.stdin.readline())\n\nnum=0\ncnt1=0\nfor c in s:\n if c =='1':\n cnt1 +=1\n else:\n num = c\n break\n#print(cnt1, num)\n\nif k<=cnt1:\n print(1)\nelse:\n print(num)"]
['Wrong Answer', 'Accepted']
['s320161305', 's125865296']
[14440.0, 3060.0]
[151.0, 18.0]
[126, 239]
p03282
u403331159
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s=input()\nk=int(input())\nfor i in range(len(s)):\n if s[i]!=1:\n print(s[i])\n exit()\nprint(1)', 's=input()\nk=int(input())\nfor i in range(k):\n if s[i]!="1":\n print(s[i])\n exit()\nprint(1)\n']
['Wrong Answer', 'Accepted']
['s911739994', 's763959910']
[2940.0, 2940.0]
[17.0, 18.0]
[98, 96]
p03282
u404676457
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["import sys\ns = input()\nk = int(input())\nend = False\nfor i in range(min(len(s), k)):\n if s[i] != '1':\n print(s[i])\n sys.exit\nprint(1)", "s = input()\nk = int(input())\nend = False\nfor i in range(min(len(s), k)):\n if s[i] != '1':\n print(s[i])\n end = True\n break\nif end == False:\n print(1)"]
['Wrong Answer', 'Accepted']
['s656541535', 's277890471']
[2940.0, 3064.0]
[17.0, 18.0]
[149, 175]
p03282
u405256066
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['from sys import stdin\nS = (stdin.readline().rstrip())\nK = int(stdin.readline().rstrip())\ncnt = 0\nfor i in S:\n if i == "1":\n cnt += 1\n else:\n ans = i\nif cnt == K:\n ans = 1\nprint(ans)', 'from sys import stdin\nS = (stdin.readline().rstrip())\nK = int(stdin.readline().rstrip())\ncnt = 0\nfor i in S:\n if i == "1":\n cnt += 1\n else:\n ans = int(i)\nif cnt >= K:\n ans = 1\nprint(ans)', 'from sys import stdin\nS = (stdin.readline().rstrip())\nK = int(stdin.readline().rstrip())\ncnt = 0\nfor i in S:\n if i == "1":\n cnt += 1\n else:\n ans = int(i)\n break\nif cnt >= K:\n ans = 1\nprint(ans)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s372656368', 's836413974', 's371874598']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[204, 209, 223]
p03282
u408375121
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\ncount = 0\nfor t in S:\n if t == 1:\n count += 1\n else:\n break\nif K <= count:\n print(1)\nelse:\n print(int(S[count]))', 'S = input()\nK = int(input())\ncount = 0\nfor t in S:\n if int(t) == 1:\n count += 1\n else:\n break\nif K <= count:\n print(1)\nelse:\n print(int(S[count]))\n']
['Wrong Answer', 'Accepted']
['s898697160', 's333026444']
[2940.0, 2940.0]
[17.0, 18.0]
[151, 157]
p03282
u409064224
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\n\n\n\nco = 0\nfor i in s:\n co += 1\n if i == "1":\n if k == co:\n print(1)\n break\n else:\n continue\n else:\n print(int(i))\n', 's = input()\nk = int(input())\n\n\ngosentyo = 5 * (10 ** 15)\n\n\n\nflg = 0\nif k <= 100:\n for i in range(len(s)-1):\n if s[i] != "1":\n print(s[i])\n break\n else:\n if k-1 == i:\n print(1)\n flg = 1\n break\n\nif flg == 0:\n for i in range(len(s)):\n if s[i] == "1":\n continue\n else:\n print(s[i])\n break\n', 's = input()\nk = int(input())\n\n\n\nco = 0\nfor i in s:\n co += 1\n if i == "1":\n if k == co:\n print(1)\n break\n else:\n continue\n else:\n print(str(i))\n', 's = input()\nk = int(input())\n\n\n\nco = 0\nfor i in s:\n co += 1\n if i == "1":\n if k == co:\n print(1)\n break\n else:\n continue\n else:\n print(i)\n', 's = input()\nk = int(input())\n\n\n\n\nco = 0\nfor i in s:\n co += 1\n if i == "1":\n if k == co:\n print(1)\n break\n else:\n continue\n else:\n print(i)\n', 's = input()\nk = int(input())\n\n\ngosentyo = 5 * (10 ** 15)\n\n\n\nflg = 0\nif k <= 100:\n for i in range(len(s)-1):\n if s[i] != "1":\n print(s[i])\n break\n else:\n if k-1 == i:\n print(1)\n flg = 1\n break\n\nif flg == 0:\n for i in range(len(s)):\n if i == len(s)-1:\n print(1)\n if s[i] == "1":\n continue\n else:\n print(s[i])\n break\n', 's = input()\nk = int(input())\n\n\n\nco = 0\nfor i in s:\n co += 1\n if i == "1":\n if k == co:\n print(1)\n break\n else:\n continue\n else:\n print(int(i))\n break\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s036862318', 's208912905', 's333539004', 's642927051', 's837980608', 's975187505', 's356481924']
[2940.0, 3064.0, 2940.0, 2940.0, 3060.0, 3064.0, 2940.0]
[17.0, 18.0, 17.0, 18.0, 17.0, 17.0, 17.0]
[234, 645, 234, 229, 607, 692, 248]
p03282
u412116291
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['MOD = 1000000007\ndef fast_power(base, power):\n """\n Returns the result of a^b i.e. a**b\n We assume that a >= 1 and b >= 0\n\n Remember two things!\n - Divide power by 2 and multiply base to itself (if the power is even)\n - Decrement power by 1 to make it even and then follow the first step\n """\n\n result = 1\n while power > 0:\n # If power is odd\n if power % 2 == 1:\n result = (result * base) % MOD\n\n # Divide the power by 2\n power = power / 2\n # Multiply base to itself\n base = (base * base) % MOD\n\n return result\n\n\ns = input()\nk = int(input())\n\ntyo = 5e15\n\nchar = [int(ss) for ss in s]\n\nres = 0\n\n_sum = 0\nok = 0\n\nfor i in range(k):\n _sum = _sum + (fast_power(s[i], tyo))\n if _sum >= k and ok == 0:\n res = s[i]\n ok = 1\n\n# for num in char:\n\n# if _sum >= k and ok == 0:\n# res = num\n# ok = 1\n\nprint(res)\n', "from math import pow\ns = input()\nk = int(input())\n\nchar = [ss for ss in s]\n\n\nres = '1'\n\n_sum = 0\nfor num in range(k):\n if num != '1':\n res = num\n break\n\nprint(res)\n", "from math import pow\ns = input()\nk = int(input())\n\nchar = [ss for ss in s]\n\n\nres = '1'\n\n_sum = 0\nfor i in range(k):\n if s[i] != '1':\n res = s[i]\n break\n\nprint(res)\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s810829384', 's983866474', 's444929195']
[3064.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[965, 181, 181]
p03282
u413318755
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
["#!/usr/bin/env python\n\ns = input().strip()\nk = input().strip()\n\nflag = True\nfor i in range(k):\n if s[i] == '1':\n print(s[i])\n flag = False\n\nif flag:\n print(s[1])\n", "#!/usr/bin/env python\n\ns = input().strip()\nk = int(input().strip())\n\nflag = True\nfor i in range(k):\n if s[i] == '1':\n print(s[i])\n flag = False\n\nif flag:\n print(s[1])\n", "#!/usr/bin/env python\n\n\ndef main():\n s = input().strip()\n k = int(input().strip())\n\n if s[0] != '1':\n print(s[0])\n return\n\n count_c = 0\n for c in s:\n if c == '1':\n count_c += 1\n\n if k <= count_c:\n print(s[k-1])\n else:\n print(s[count_c])\n\n\nmain()\n", "#!/usr/bin/env python\n\n\ndef main():\n s = input().strip()\n k = int(input().strip())\n\n \n if s[0] != '1':\n print(s[0])\n return\n\n count_one = 0\n for c in s:\n if c == '1':\n count_one += 1\n else:\n break\n\n if k <= count_one:\n print(1)\n else:\n print(s[count_one])\n\n\nmain()\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s009221611', 's764538404', 's823313764', 's868976771']
[2940.0, 2940.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0, 17.0]
[182, 187, 313, 406]
p03282
u416758623
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['s = input()\nk = int(input())\nans = 0\nfor i in range(len(s)):\n if s[i] != 1 or s[i] != 0:\n ans = s[i]\n break\nprint(ans)', 's = input()\nk = int(input())\nans = 0\ncount = 0\nfor i in range(len(s)):\n if k == "1":\n count += 1\n if count == k:\n ans = 1\n break\n else:\n ans = s[i]\n break\nprint(ans)', 's = input()\nk = int(input())\nans = 0\nfor i in range(len(s)):\n if k == 1:\n ans = s[0]\n break\n if s[i] != 1 or s[i] != 0:\n ans = s[i]\n break\nprint(ans)\n', 's = input()\nk = int(input())\ncount = 0\nans = 0\nfor i in range(len(s)):\n if s[i] == "1":\n count += 1\n if count == k:\n ans = 1\n break\n else:\n ans = s[i]\n break\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s428612717', 's609669308', 's877096575', 's059451646']
[2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[135, 221, 184, 224]
p03282
u426108351
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input()\nK = int(input())\nans = 1\nfor i in range(min(len(S), K)):\n if S[i] == 1:\n continue\n else:\n ans = int(S[i])\n break\nprint(ans)\n\n \n \n \n ', "S = input()\nK = int(input())\nans = 1\nfor i in range(min(len(S), K)):\n if S[i] == '1':\n continue\n else:\n ans = int(S[i])\n break\nprint(ans)\n\n \n \n \n "]
['Wrong Answer', 'Accepted']
['s133797140', 's207753631']
[3060.0, 2940.0]
[21.0, 18.0]
[160, 162]
p03282
u439176910
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`. For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?
['S = input().rstrip()\nK = int(input())\nc = 0\nfor item in S:\n if item == "1":\n c+=1\n else:\n break\nn = S[c] if c < len(S) else None\na = n if n and c < K and else S[0]\nprint(a)', 'S = input().rstrip()\nK = int(input())\na = S[1] if K > 1 and S[0] == "1" and len(S) > 1 else S[0]', 'S = input().rstrip()\nK = int(input())\nc = 0\nfor item in S:\n if not item == "1":\n break\n c+=1\nn = S[c] if c < len(S) else None\na = n if n and c < K else S[0]\nprint(a)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s028157270', 's491318423', 's220936794']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[180, 96, 170]