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
p02629
u459150945
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nans = ''\nwhile N > 0:\n N -= 1\n ans += chr(ord('a' + N % 26))\n N //= 26\nprint(ans[::-1])\n", "N = int(input())\nans = ''\nwhile N > 0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(ans[::-1])\n"]
['Runtime Error', 'Accepted']
['s736604146', 's171616717']
[9172.0, 8984.0]
[29.0, 33.0]
[114, 114]
p02629
u460386402
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n=int(input())\na=[\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\'w\',\'x\',\'y\',\'z\']\nb=[]\n\nwhile n!=0:\n amari=n%26\n b.append(amari)\n n=n//26\n \nfor i in range(len(b)):\n print(a[b[-1-i]-1],end="")', 'n=int(input())\na=list(map(int,input().split()))\nq=int(input())\nfor i in range(q):\n b,c=map(int,input().split())\n \n for j in range(n):\n if a[j]==b:\n a[j]=c\n print(sum(a))', 'n=int(input())\na=[\'a\',\'b\',\'c\',\'d\',\'e\',\'f\',\'g\',\'h\',\'i\',\'j\',\'k\',\'l\',\'m\',\'n\',\'o\',\'p\',\'q\',\'r\',\'s\',\'t\',\'u\',\'v\',\'w\',\'x\',\'y\',\'z\']\nb=[]\n\nwhile n!=0:\n amari=n%26\n b.append(amari)\n if amari==0:\n break\n n=n//26\n \nfor i in range(len(b)):\n print(a[b[-1-i]-1],end="")', 'n=int(input())\nb=""\n\nwhile n>0:\n n-=1\n b+=chr(ord("a")+n%26)\n n=n//26\n \nprint(b[::-1])']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s405643812', 's638839973', 's728226097', 's439867317']
[9152.0, 9116.0, 9184.0, 9172.0]
[29.0, 26.0, 30.0, 31.0]
[237, 181, 262, 90]
p02629
u469550773
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import string\n\nasc = string.ascii_lowercase\nprint(asc,len(asc))\nN = int(input())\nname = ""\ntmp = N - 1\ndiv = 1\nwhile div > 0:\n div = tmp // 26\n mod = tmp % 26\n tmp = div - 1\n name += asc[mod]\n\n print(name)', 'import string\n\nasc = string.ascii_lowercase\nprint(asc,len(asc))\nN = int(input())\nname = ""\ntmp = N - 1\ndiv = 1\nwhile div > 0:\n div = tmp // 26\n mod = tmp % 26\n tmp = div - 1\n name += asc[mod]\n\nprint(name)', 'import string\n\nasc = string.ascii_lowercase\nN = int(input())\nname = ""\ntmp = N - 1\ndiv = 1\nwhile div > 0:\n div = tmp // 26\n mod = tmp % 26\n tmp = div - 1\n name = asc[mod] + name\n\nprint(name)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s064511560', 's428199823', 's591285239']
[9980.0, 9816.0, 9984.0]
[41.0, 41.0, 40.0]
[210, 208, 194]
p02629
u469936642
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nf = []\n\nif n > 26:\n\twhile n:\n\t\tn -= 1\n\t\tn, r = divmod(n, 26)\n\t\tf += [r]\nelse:\n\tf += [n]\n\ng = ''\ns = string. ascii_lowercase\nf.reverse()\nfor i in f:\n\tg += s[i]\n\nprint(g)", "import string\n\nn = int(input())\nf = []\n\nif n > 26:\n\twhile n:\n\t\tn -= 1\n\t\tn, r = divmod(n, 26)\n\t\tf += [r]\nelse:\n\tf += [n]\n\ng = ''\ns = string.ascii_lowercase\nf.reverse()\nfor i in f:\n\tg += s[i]\n\nprint(g)", "import string\n\nn = int(input())\nf = []\n\nif n > 26:\n\twhile n:\n\t\tn -= 1\n\t\tn, r = divmod(n, 26)\n\t\tf += [r]\nelse:\n\tf += [n-1]\n\ng = ''\ns = string. ascii_lowercase\nf.reverse()\nfor i in f:\n\tg += s[i]\n\nprint(g)"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s274524625', 's357885180', 's519524446']
[9124.0, 9976.0, 9944.0]
[25.0, 44.0, 39.0]
[185, 199, 202]
p02629
u475189661
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["a_list = [chr(ord('a') + i) for i in range(26)]\nn = int(input())\n\nl_list = []\nans = ''\nwhile n > 0:\n \n if n % 26 == 0:\n l_list.append(25)\n n = n // 26 - 1\n else:\n l_list.append(n%26)\n n = n // 26\nl_list = l_list[::-1]\nfor i in l_list:\n ans += a_list[i]\nprint(ans)", "\ta_list = [chr(ord('a') + i) for i in range(26)]\nn = int(input())\n\nl_list = []\nans = ''\nwhile n > 0:\n \n if n % 26 == 0:\n l_list.append(25)\n n = n // 26 - 1\n else:\n l_list.append(n%26)\n n = n // 26\nl_list = l_list[::-1]\nfor i in l_list:\n ans += a_list[i]\nprint(ans)", "a_list = [chr(ord('a') + i) for i in range(26)]\nn = int(input())\n\nl_list = []\nans = ''\nwhile n > 0:\n if n % 26 == 0:\n l_list.append(26)\n n = n // 26 - 1\n else:\n l_list.append(n%26)\n n = n // 26\nl_list = l_list[::-1]\nfor i in l_list:\n ans += a_list[i-1]\nprint(ans)"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s031264972', 's527894424', 's991355610']
[9164.0, 8876.0, 9104.0]
[31.0, 26.0, 30.0]
[303, 304, 300]
p02629
u475966842
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['#x = 1000000000000001\nx=int(input())\nlist_Shou=[]\nlist_New = []\nlist_Alphabet = [""]\nfor i in range(97, 97+26):\n list_Alphabet.append(chr(i))\n\nfor i in range(1, 11)[::-1]:\n Warukazu = 26**i\n Shou = min(x//Warukazu,26)\n Amari = x - (Shou*Warukazu)\n print(str(Warukazu)+"="+str(Shou)+"..."+str(Amari))\n \n if Amari==26**(i-1) and Shou>0:\n Shou+=-1\n Amari+=Warukazu\n print("New"+str(Shou)+"/"+str(Amari))\n \n list_Shou.append(Shou)\n x=Amari\n \n \n\nprint(list_Shou)\n\n\nfor j in list_Shou:\n list_New.append(list_Alphabet[j])\nprint(list_New)\nAnswer = "".join(list_New)\nprint(Answer)\n', 'import math\nli=[chr(i) for i in range(97, 97+26)]\nAnsFromRight = []\nAmsFromLeft=[]\ndef GetN_Hidari(j):\n tmp=0\n for k in range(j+1):\n tmp+=26**k\n return tmp-1 \n#---------\nN=int(input())\ni=0\nwhile True:\n N_HidariCut=N-GetN_Hidari(i)\n if N_HidariCut<=0:\n break\n OrderWithinKatamari = N_HidariCut%(26**(i+1))\n AnsFromRight.append(li[math.ceil(OrderWithinKatamari/(26**i)-1)])\n i+=1 \nAnsFromLeft= AnsFromRight[::-1]\nprint("".join(AnsFromLeft))']
['Wrong Answer', 'Accepted']
['s214167832', 's753533829']
[9104.0, 9216.0]
[31.0, 31.0]
[858, 502]
p02629
u476674874
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import numpy as np\ndef resolver(N):\n N -= 1\n digits = "abcdefghijklmnopqrstuvwxyz"\n i = 1\n while True:\n if N < 26**i:\n break\n N -= 26**i\n i += 1\n \n number = []\n for _ in range(i):\n tmp = N % 26 \n number.append(tmp)\n N //= 26\n\n print(number)\n\n ans = "".join([digits[i] for i in reversed(number)])\n return ans\n\ndef test():\n pass\n\ndef main():\n\n test()\n\n N = int(input())\n \n ans = resolver(N)\n\n print(ans)\n\n\n\nif __name__ == \'__main__\':\n main()', " #test()\n N = int(input())\n ans = resolver(N)\n\n print(ans)\n\nif __name__ == '__main__':\n main()\n", 'import numpy as np\ndef resolver(N):\n N -= 1\n digits = "abcdefghijklmnopqrstuvwxyz"\n i = 1\n while True:\n if N < 26**i:\n break\n N -= 26**i\n i += 1\n \n number = []\n for _ in range(i):\n tmp = N % 26 \n number.append(tmp)\n N //= 26\n\n ans = "".join([digits[i] for i in reversed(number)])\n return ans\n\ndef test():\n for i in range(1,100):\n ans = resolver(i)\n print(f"\\ri={i:03} {ans}", end="")\n print()\n\ndef main():\n\n #test()\n\n N = int(input())\n \n ans = resolver(N)\n\n print(ans)\n\n\n\nif __name__ == \'__main__\':\n main()']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s676558047', 's989967827', 's448708603']
[27100.0, 8968.0, 27056.0]
[119.0, 27.0, 115.0]
[543, 110, 624]
p02629
u478719560
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import sys\nimport string\n#from collections import defaultdict, deque, Counter\n\n#import heapq\n#import math\n#from itertools import accumulate\n#from itertools import permutations as perm\n#from itertools import combinations as comb\n#from itertools import combinations_with_replacement as combr\n#from fractions import gcd\n#import numpy as np\n\nstdin = sys.stdin\nsys.setrecursionlimit(10 ** 7)\nMIN = -10 ** 9\nMOD = 10 ** 9 + 7\nINF = float("inf")\nIINF = 10 ** 18\n\ndef main():\n n = int(stdin.readline().rstrip())\n #n,k = map(int, stdin.readline().rstrip().split())\n #p = list(map(int, stdin.readline().rstrip().split()))\n #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]\n #word = [stdin.readline().rstrip() for _ in range(n)]\n #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]\n \n letter = string.ascii_lowercase\n print(letter)\n sho, amari = divmod(n,26)\n if sho == 0:\n print(letter[amari-1])\n exit()\n t = 11\n while True:\n if n > 26**t:\n break\n else:\n t -= 1\n for i in range(t,0,-1):\n sho, amari = divmod(n,26 ** i)\n print(letter[sho-1],end="")\n n = amari\n print(letter[amari-1])\n\n\n\n\nmain()\n', 'import sys\nimport string\n#from collections import defaultdict, deque, Counter\n\n#import heapq\n#import math\n#from itertools import accumulate\n#from itertools import permutations as perm\n#from itertools import combinations as comb\n#from itertools import combinations_with_replacement as combr\n#from fractions import gcd\n#import numpy as np\n\nstdin = sys.stdin\nsys.setrecursionlimit(10 ** 7)\nMIN = -10 ** 9\nMOD = 10 ** 9 + 7\nINF = float("inf")\nIINF = 10 ** 18\n\ndef main():\n n = int(stdin.readline().rstrip())\n #n,k = map(int, stdin.readline().rstrip().split())\n #p = list(map(int, stdin.readline().rstrip().split()))\n #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]\n #word = [stdin.readline().rstrip() for _ in range(n)]\n #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]\n \n letter = string.ascii_lowercase\n ans = str(num2alpha(n))\n ans = ans.lower()\n print(ans)\n\n\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nmain()\n']
['Wrong Answer', 'Accepted']
['s161227840', 's031657062']
[9976.0, 9772.0]
[43.0, 38.0]
[1290, 1181]
p02629
u480264129
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nnum2alpha(int(input())).lower()', 'def num2alpha(num):\n\tif num<=26:\n\t\treturn chr(64+num)\n\telif num%26==0:\n\t\treturn num2alpha(num//26-1)+chr(90)\n\telse:\n\t\treturn num2alpha(num//26)+chr(64+num%26)\n\nprint(num2alpha(int(input())).lower())']
['Wrong Answer', 'Accepted']
['s555105036', 's481912676']
[9176.0, 9180.0]
[26.0, 37.0]
[217, 198]
p02629
u483391772
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\nalphabet = "abcdefghijklmnopqrstuvdxyz"\nk=0\nname =""\nNhen = N\nq = 10000000000000000\nwhile q > 26:\n k += 1\n q,mod = divmod(Nhen,26)\n Nhen = q\n named = mod - 1\n name = alphabet[named]+name\nq -= 1\nname = alphabet[q]+name\nprint(name)', 'import sys\nimport math\n\nALPHABET = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]\nresult = []\nN = int(input())\ndef alphabet_decimal(v):\n quotient = math.floor(v / len(ALPHABET))\n surplus = v % len(ALPHABET)\n quotient -= 1 if surplus == 0 else 0\n surplus = len(ALPHABET) if surplus == 0 else surplus\n result.append(surplus)\n if len(ALPHABET) < quotient:\n alphabet_decimal(quotient)\n elif len(ALPHABET) < v:\n result.append(quotient)\n return "".join([ALPHABET[i - 1] for i in reversed(result)])\n\nprint(alphabet_decimal(N).lower())']
['Wrong Answer', 'Accepted']
['s273268378', 's400953241']
[9188.0, 9132.0]
[29.0, 30.0]
[261, 624]
p02629
u483742540
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\n2 ans = ''\n3 while N > 0:\n4 N -= 1\n5 ans += chr(ord('a') + N % 26)\n6 N //= 26\n7 print(ans[::-1])", "N = int(input())\nans = ''\nwhile N > 0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(ans[::-1])"]
['Runtime Error', 'Accepted']
['s281194769', 's725002428']
[8952.0, 9084.0]
[26.0, 32.0]
[113, 107]
p02629
u485893928
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\na = ''\n \nif n == 1:\n print('a')\nif n == 26:\n print('z')\nelse:\n while n > 0:\n \tif n%26 == 1:\n \ta += 'a'\n \telif n%26 == 2:\n \ta += 'b'\n \telif n%26 == 3:\n \ta += 'c'\n \telif n%26 == 4:\n \ta += 'd'\n \telif n%26 == 5:\n \ta += 'e'\n \telif n%26 == 6:\n \ta += 'f'\n \telif n%26 == 7:\n \ta += 'g'\n \telif n%26 == 8:\n \ta += 'h'\n \telif n%26 == 9:\n \ta += 'i'\n \telif n%26 == 10:\n \ta += 'j'\n \telif n%26 == 11:\n \ta += 'k'\n \telif n%26 == 12:\n \ta += 'l'\n \telif n%26 == 13:\n \ta += 'm'\n \telif n%26 == 14:\n \ta += 'n'\n \telif n%26 == 15:\n \ta += 'o'\n \telif n%26 == 16:\n \ta += 'p'\n \telif n%26 == 17:\n \ta += 'q'\n \telif n%26 == 18:\n \ta += 'r'\n \telif n%26 == 19:\n \ta += 's'\n \telif n%26 == 20:\n \ta += 't'\n \telif n%26 == 21:\n \ta += 'u'\n \telif n%26 == 22:\n \ta += 'v'\n \telif n%26 == 23:\n \ta += 'w'\n \telif n%26 == 24:\n \ta += 'x'\n \telif n%26 == 25:\n \ta += 'y'\n \telif n%26 == 0:\n \ta += 'z'\n \tn -=26\n \tn = int(n / 26)\n\ta = a[::-1]\n\tprint(a)", "n = int(input())\na = ''\n\nif n == 1:\n print('a')\nif n == 26:\n print('z')\nelse:\n while n > 0:\n if n%26 == 1:\n a += 'a'\n elif n%26 == 2:\n a += 'b'\n elif n%26 == 3:\n a += 'c'\n elif n%26 == 4:\n a += 'd'\n elif n%26 == 5:\n a += 'e'\n elif n%26 == 6:\n a += 'f'\n elif n%26 == 7:\n a += 'g'\n elif n%26 == 8:\n a += 'h'\n elif n%26 == 9:\n a += 'i'\n elif n%26 == 10:\n a += 'j'\n elif n%26 == 11:\n a += 'k'\n elif n%26 == 12:\n a += 'l'\n elif n%26 == 13:\n a += 'm'\n elif n%26 == 14:\n a += 'n'\n elif n%26 == 15:\n a += 'o'\n elif n%26 == 16:\n a += 'p'\n elif n%26 == 17:\n a += 'q'\n elif n%26 == 18:\n a += 'r'\n elif n%26 == 19:\n a += 's'\n elif n%26 == 20:\n a += 't'\n elif n%26 == 21:\n a += 'u'\n elif n%26 == 22:\n a += 'v'\n elif n%26 == 23:\n a += 'w'\n elif n%26 == 24:\n a += 'x'\n elif n%26 == 25:\n a += 'y'\n elif n%26 == 0:\n a += 'z'\n n -=26\n n = int(n / 26)\na = a[::-1]\nprint(a)\n \n\n", "n = int(input())\na = ''\n\nif n == 1:\n print('a')\nif n == 26:\n print('z')\nelse:\n while n > 0:\n \tif n%26 == 1:\n \ta += 'a'\n \telif n%26 == 2:\n \ta += 'b'\n \telif n%26 == 3:\n \ta += 'c'\n \telif n%26 == 4:\n \ta += 'd'\n \telif n%26 == 5:\n \ta += 'e'\n \telif n%26 == 6:\n \ta += 'f'\n \telif n%26 == 7:\n \ta += 'g'\n \telif n%26 == 8:\n \ta += 'h'\n \telif n%26 == 9:\n \ta += 'i'\n \telif n%26 == 10:\n \ta += 'j'\n \telif n%26 == 11:\n \ta += 'k'\n \telif n%26 == 12:\n \ta += 'l'\n \telif n%26 == 13:\n \ta += 'm'\n \telif n%26 == 14:\n \ta += 'n'\n \telif n%26 == 15:\n \ta += 'o'\n \telif n%26 == 16:\n \ta += 'p'\n \telif n%26 == 17:\n \ta += 'q'\n \telif n%26 == 18:\n \ta += 'r'\n \telif n%26 == 19:\n \ta += 's'\n \telif n%26 == 20:\n \ta += 't'\n \telif n%26 == 21:\n \ta += 'u'\n \telif n%26 == 22:\n \ta += 'v'\n \telif n%26 == 23:\n \ta += 'w'\n \telif n%26 == 24:\n \ta += 'x'\n \telif n%26 == 25:\n \ta += 'y'\n \telif n%26 == 0:\n \ta += 'z'\n \tn -=26\n \tn = int(n / 26)\n\ta = a[::-1]\n\tprint(a)\n \n\n", "n = int(input())\na = ''\n\nwhile n > 0:\n if n%26 == 1:\n a += 'a'\n elif n%26 == 2:\n a += 'b'\n elif n%26 == 3:\n a += 'c'\n elif n%26 == 4:\n a += 'd'\n elif n%26 == 5:\n a += 'e'\n elif n%26 == 6:\n a += 'f'\n elif n%26 == 7:\n a += 'g'\n elif n%26 == 8:\n a += 'h'\n elif n%26 == 9:\n a += 'i'\n elif n%26 == 10:\n a += 'j'\n elif n%26 == 11:\n a += 'k'\n elif n%26 == 12:\n a += 'l'\n elif n%26 == 13:\n a += 'm'\n elif n%26 == 14:\n a += 'n'\n elif n%26 == 15:\n a += 'o'\n elif n%26 == 16:\n a += 'p'\n elif n%26 == 17:\n a += 'q'\n elif n%26 == 18:\n a += 'r'\n elif n%26 == 19:\n a += 's'\n elif n%26 == 20:\n a += 't'\n elif n%26 == 21:\n a += 'u'\n elif n%26 == 22:\n a += 'v'\n elif n%26 == 23:\n a += 'w'\n elif n%26 == 24:\n a += 'x'\n elif n%26 == 25:\n a += 'y'\n elif n%26 == 0:\n a += 'z'\n n -=26\n n = int(n / 26)\na = a[::-1]\nprint(a)\n "]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s247482209', 's683373603', 's894651700', 's775324895']
[9140.0, 8972.0, 9136.0, 9012.0]
[26.0, 32.0, 24.0, 33.0]
[1189, 1139, 1195, 1074]
p02629
u496132828
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nN=int(input())\ninput(num2alpha(N).lower())', 'def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nN=int(input())\nprint(num2alpha(N).lower())']
['Runtime Error', 'Accepted']
['s837605787', 's437013057']
[9188.0, 9160.0]
[30.0, 28.0]
[229, 229]
p02629
u496212176
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\n\nalphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nans = []\nwhile True:\n mod = n % 26\n if mod != 0:\n ans.append(mod)\n n = n // 26\n if n < 26:\n ans.append(n)\n break\nans_s = ''\nfor tmp in reversed(ans):\n ans_s += alphabet[tmp - 1]\nprint(ans_s)", "n = int(input())\n\nalphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nans = []\nwhile True:\n mod = n % 26\n if mod != 0:\n ans.append(mod)\n n = n // 26\n if n < 26:\n ans.append(n)\n break\nprint(ans)\nans_s = ''\nfor tmp in reversed(ans):\n ans_s += alphabet[tmp - 1]\nprint(ans_s)", 'n = int(input())\ncha = "abcdefghijklmnopqrstuvwxyz"\nans = []\nwhile True:\n mod = (n - 1) % 26\n n = (n - 1) // 26\n if n < 26:\n ans.append(n)\n break\nans_s = \'\'\nfor tmp in reversed(ans):\n ans_s += cha[tmp - 1]\nprint(ans_s)', 'n = int(input())\ncha = "abcdefghijklmnopqrstuvwxyz"\nans = []\nwhile n >= 1:\n mod = (n - 1) % 26\n ans.append(mod)\n n = (n - 1) // 26\n \nans_s = \'\'\nfor tmp in reversed(ans):\n ans_s += cha[tmp]\nprint(ans_s)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s407016124', 's483625520', 's950198030', 's838232387']
[9188.0, 9216.0, 9128.0, 9204.0]
[31.0, 31.0, 34.0, 30.0]
[387, 398, 244, 216]
p02629
u497277272
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["\ndef main():\n n = int(input())\n alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n \n exponent_list = [0]\n for i in range(1, 12):\n exponent_list.append(exponent_list[i-1] + 26**i)\n \n index = 0\n n_index = 0\n ans = ''\n \n\n \n while exponent_list[index] < n:\n n_index = index\n index += 1\n #print(n_index)\n r_list = []\n r = 27\n b = 0\n while r > 27:\n tmp = n - exponent_list[n_index]\n r = int(tmp/26)\n b = tmp % 26\n \n ans = alphabet[r] + alphabet[b]\n print(ans)\n \nif __name__ == '__main__':\n main()", "\ndef main():\n n = int(input())\n alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n \n exponent_list = [0]\n for i in range(1, 12):\n exponent_list.append(exponent_list[i-1] + 26**i)\n \n index = 0\n n_index = 0\n ans = ''\n \n\n \n while exponent_list[index] < n:\n n_index = index\n index += 1\n #print(n_index)\n r_list = []\n r = 27\n b = 0\n while r > 27:\n tmp = n - exponent_list[n_index]\n r = int(tmp/26)\n b = tmp % 26\n \n ans = alphabet[r] + alphabet[b]\n print(ans)\n \nif __name__ == '__main__':\n main()", "\ndef main():\n n = int(input())\n ans = ''\n \n for i in range(1, 99):\n if n <= 26 ** i:\n n -= 1\n for j in range(i):\n ans += chr(ord('a') + n % 26)\n n //= 26\n break\n else:\n n -= 26 ** i\n \n print(ans[::-1])\n \nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s307768853', 's409282797', 's335932855']
[9240.0, 9144.0, 9068.0]
[30.0, 31.0, 32.0]
[732, 732, 350]
p02629
u497592162
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nalpha = [chr(ord('a') + i) for i in range(26)]\nq = N\nans = ''\nwhile q >= 26:\n q, mod = divmod(q, 26)\n ans = alpha[mod-1] + ans\nif mod != 0:\n ans = alpha[q-1] + ans\nprint(ans)", "alpha = [-1]\nalpha.extend([chr(ord('a') + i) for i in range(26)])\nq = N\nmod = N\nans = ''\nwhile q >= 27:\n q, mod = divmod(q, 26)\n ans = alpha[mod] + ans\nif mod != 0:\n ans = alpha[q] + ans\nprint(ans)\n", "\n\nalpha = ['Z']\nalpha.extend([chr(ord('a') + i) for i in range(26)])\nN = int(input())\nq = N\nans = ''\nwhile True:\n if q <= 26:\n ans += str(alpha[q])\n break\n else:\n q, mod = divmod(q, 26)\n if mod == 0:\n q -= 1\n mod = 26\n ans += str(alpha[mod])\n\nprint(ans[::-1])"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s405904332', 's926552189', 's010256258']
[9044.0, 8836.0, 9212.0]
[24.0, 23.0, 30.0]
[200, 207, 364]
p02629
u504194367
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nli = []\nchar_li = [chr(i) for i in range(97,97+26)]\na = ''\n\nwhile N > 0:\n li.append(N % 26)\n N = N // 26\n\nprint(li)\n\nfor index in reversed(li):\n a += char_li[index - 1]\n \nprint(a)", "import math\n\nN = int(input())\n\ngroup_seq_index = math.ceil(math.log(25*N/26+1)/math.log(26))\nchar_li = [chr(i) for i in range(97,97+26)]\nli = []\na = ''\n\nN -= int((1 - 26 ** (group_seq_index + 1)) / -25)\n\nfor i in range(group_seq_index):\n li.append(N % 26)\n N = N // 26\n\nfor index in reversed(li):\n a += char_li[index]\n \nprint(a)"]
['Wrong Answer', 'Accepted']
['s568128641', 's537977521']
[9072.0, 9028.0]
[27.0, 28.0]
[200, 332]
p02629
u504856568
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nnum = int(input())\nanswer = num2alpha(num)\nprint(answer)', 'def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nnum = int(input())\nanswer = num2alpha(num)\nprint(answer.lower())']
['Wrong Answer', 'Accepted']
['s474031346', 's568556446']
[9128.0, 9124.0]
[30.0, 28.0]
[242, 250]
p02629
u506040989
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import sys\n\ndef main(n):\n c = "abcdefghijklmnopqrstuvwxyz"\n m = {}\n for i in range(0, 26):\n m[i+1] = c[i]\n\n s = ""\n while n > 0:\n s = m[(n%26)] + s\n n /= 26\n return s\n\nn = int(sys.stdin.readline().strip())\nprint(main(n))\n', 'import sys\n\ndef main(n):\n c = "abcdefghijklmnopqrstuvwxyz"\n m = {}\n for i in range(0, 26):\n m[i+1] = c[i]\n\n s = ""\n while n > 0:\n if n%26 == 0:\n t = 26\n n //= 26\n n -= 1\n else:\n t = n%26\n n //= 26\n s = m[t] + s\n return s\n\nn = int(sys.stdin.readline().strip())\nprint(main(n))\n']
['Runtime Error', 'Accepted']
['s533445178', 's970525842']
[9000.0, 9120.0]
[24.0, 32.0]
[260, 376]
p02629
u507145838
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\ni = 0\na,b = divmod(N, 26)\nA = list(range(a))\n\nwhile(N!=0):\n c,d = divmod(N-1, 26)\n A[i] = chr(d+97)\n N = c\n i+=1\n\nA.reverse()\nprint("".join(A))', 'import math\n\nN = int(input())\ni = 0\n\n#c = math.log(N-1, 26)\n#A = list(range(int(c)+1))\nA = []\n\nwhile(N!=0):\n c,d = divmod(N-1, 26)\n A.append(chr(d+97))\n \n N = c\n i+=1\n\nA.reverse()\nprint("".join(A))\n']
['Runtime Error', 'Accepted']
['s177636788', 's540079818']
[1532392.0, 9108.0]
[1793.0, 33.0]
[164, 220]
p02629
u507456172
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N=int(input())\nalphabets=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nans=[]\n\nfor i in range(15):\n K=(((N-N%(26**i))%26**(i+1))//26**(i))\n if K==1:\n break\n else:\n if K==-1:\n K=25\n ans.insert(0,alphabets[K-1])\n\nans="".join(ans)\nprint(ans)', 'N = int(input())\nS = ""\nalphabets=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\n\nwhile N > 0:\n if N%26 != 0:\n S = alphabets[(N%26)-1] + S\n N = (N-N%26)//26\n else:\n S = alphabets[(N%26)-1] + S\n N = (N-26)//26\n\nprint(S)']
['Wrong Answer', 'Accepted']
['s060106076', 's693518597']
[9224.0, 9084.0]
[28.0, 29.0]
[315, 291]
p02629
u508934152
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nans=''\n\nfor i in range(1, 99):\n\tif N <= 26 ** i:\n N -= 1\n for j in range(i):\n ans += chr(ord('a') + N % 26)\n N //= 26\n break\n else:\n N -= 26 ** i\n\nprint(ans[::-1]) # reversed", "N = int(input())\nans=''\n\nfor i in range(1, 99):\n if N <= 26 ** i:\n N -= 1\n for j in range(i):\n ans += chr(ord('a') + N % 26)\n N //= 26\n break\n else:\n N -= 26 ** i\n\nprint(ans[::-1]) # reversed"]
['Runtime Error', 'Accepted']
['s048409251', 's213078049']
[8956.0, 9176.0]
[27.0, 31.0]
[228, 215]
p02629
u509739538
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\n\ndef solve(n):\n\t#n = readInt()\n\ti = 1\n\tmaxk = 26\n\twhile 1:\n\t\tif n<=maxk:\n\t\t\tke = i\n\t\t\tbreak\n\t\telse:\n\t\t\ti+=1\n\t\t\tmaxk =maxk + 26**i\n\t#print(ke)\n\t\n\ttar = n\n\tl= []\n\twhile 1:\n\t\tif tar<=26:\n\t\t\tl.append(tar)\n\t\t\tbreak\n\t\telse:\n\t\t\tt = tar%(26**(i-1))\n\t\t\t#t = tar//(26**(i-1))\n\t\t\tt = (tar-t)//(26**(i-1))\n\t\t\tt = min(t,26)\n\t\t\tif t==0:\n\t\t\t\tl[-1]-=1\n\t\t\tt=26\n\t\t\tl.append(t)\n\t\t\ttar = tar - t*(26**(i-1))\n\t\t\ti-=1\n\n\tprint("".join([chr(96+i) for i in l]))\n\nsolve(924093)\n\n#\tprint(i)\n#\tsolve(i)', 'def readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\n\ndef solve(n):\n\t#n = readInt()\n\ti = 1\n\tmaxk = 26\n\twhile 1:\n\t\tif n<=maxk:\n\t\t\tke = i\n\t\t\tbreak\n\t\telse:\n\t\t\ti+=1\n\t\t\tmaxk =maxk + 26**i\n\t#print(ke)\n\t\n\ttar = n\n\tl= []\n\twhile 1:\n\t\tif tar<=26:\n\t\t\tl.append(tar)\n\t\t\tbreak\n\t\telse:\n\t\t\tt = tar%(26**(i-1))\n\t\t\t#t = tar//(26**(i-1))\n\t\t\tt = (tar-t)//(26**(i-1))\n\t\t\tt = min(t,26)\n\t\t\tl.append(t)\n\t\t\ttar = tar - t*(26**(i-1))\n\t\t\ti-=1\n\n\tprint("".join([chr(96+i) for i in l]))\n\nsolve(924093)\n\n#\tprint(i)\n#\tsolve(i)', 'def readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\n \ndef solve(n):\n\t#n = readInt()\n\ti = 1\n\tmaxk = 26\n\twhile 1:\n\t\tif n<=maxk:\n\t\t\tke = i\n\t\t\tbreak\n\t\telse:\n\t\t\ti+=1\n\t\t\tmaxk =maxk + 26**i\n\t#print(ke)\n\t\n\ttar = n\n\tl= []\n\twhile 1:\n\t\tif tar<=26:\n\t\t\tl.append(tar)\n\t\t\tbreak\n\t\telse:\n\t\t\tt = tar%(26**(i-1))\n\t\t\t#t = tar//(26**(i-1))\n\t\t\tt = (tar-t)//(26**(i-1))\n\t\t\tt = min(t,26)\n\t\t\tif t==0:\n\t\t\t\tl[-1]-=1\n\t\t\t\tt=26\n\t\t\tl.append(t)\n\t\t\ttar = tar - t*(26**(i-1))\n\t\t\ti-=1\n \n\tprint("".join([chr(96+i) for i in l]))\n \nsolve(924093)\n\n#\tprint(i)\n#\tsolve(i)', 'def readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\n \ndef solve(n):\n\t#n = readInt()\n\ti = 1\n\tmaxk = 26\n\twhile 1:\n\t\tif n<=maxk:\n\t\t\tke = i\n\t\t\tbreak\n\t\telse:\n\t\t\ti+=1\n\t\t\tmaxk =maxk + 26**i\n\t#print(ke)\n\t\n\ttar = n\n\tl= []\n\twhile 1:\n\t\ta = tar//26\n\t\tb = tar%26\n\t\tif b==0:\n\t\t\ta-=1\n\t\t\tb = 26\n\t\tl.append(chr(ord("a")-1+b))\n\t\ttar = a\n\t\tif tar==0:\n\t\t\tbreak\n \n\tprint("".join(l[::-1]))\n \nsolve(readInt())\n\n#\tprint(i)\n#\tsolve(i)']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s714337033', 's884116713', 's964160893', 's000485742']
[9100.0, 9176.0, 9080.0, 9224.0]
[31.0, 32.0, 27.0, 29.0]
[682, 649, 686, 565]
p02629
u511457539
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['\nN = int(input())\n# = map(int, input().split())\n# = list(map(int, input().split()))\n\n\nalpha = [chr(ord(\'a\') + i) for i in range(26)]\nname = []\nnumber = []\na = 1\ncount = 0\n\nwhile N//a > 0:\n a = a*26\n count += 1\n\na = a/26\n\nfor i in range(count):\n num = int(N//a)\n number.append(num)\n N = N - num*a\n a = a//26\n\nprint(number)\n\nfor i in range(count):\n if number[-i] == 0:\n for j in range(count-i-1):\n number[j] -= 1\n del number[0]\nprint(number)\n\nfor i in number:\n name.append(alpha[i-1])\n\nresult = "".join(name)\nprint(result)\n', "n = int(input())\nans = ''\nwhile n > 0:\n n, r = divmod(n-1, 26)\n ans = chr(r+ord('a')) + ans\nprint(ans)\n"]
['Runtime Error', 'Accepted']
['s257326558', 's311689222']
[9292.0, 9136.0]
[30.0, 29.0]
[661, 109]
p02629
u513434790
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\n\ns = 1\nwhile N > 26 ** s:\n N -= 26 ** s\n s += 1\n\nans = ""\nN -= 1\nfor i in range(s):\n ans += chr(ord("a") + ord(N % 26))\n N = N // 26\n\nprint(ans[::-1])', 'N = int(input())\n\ns = 1\nwhile N > 26 ** s:\n N -= 26 ** s\n s += 1\n\nans = ""\nN -= 1\nfor i in range(s):\n ans += chr(ord("a") + N % 26)\n N = N // 26\n\nprint(ans[::-1])']
['Runtime Error', 'Accepted']
['s485316876', 's943242804']
[9152.0, 9184.0]
[25.0, 31.0]
[179, 174]
p02629
u513858037
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nans = ''\n\nfor i in range(1,99):\n if n <= 26**i:\n n -= 1\n for j in range(i):\n ans += chr(ord('a')+N%26)\n n //= 26\n break\n else:\n n -= 26**i\n\nprint(ans[::-1])", "n = int(input())\nans = ''\n\nfor i in range(100):\n if n <= 26**i:\n n -= 1\n for j in range(i)\n ans += chr(ord('a')+N%26)\n n //= 26\n break\n else:\n n -= 26**i\n\nprint(ans[::-1])", "n = int(input())\nans = ''\n\nfor i in range(1,99):\n if n <= 26**i:\n n -= 1\n for j in range(i):\n ans += chr(ord('a')+n%26)\n n //= 26\n break\n else:\n n -= 26**i\n\nprint(ans[::-1])"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s531384472', 's874885022', 's781701855']
[9156.0, 8908.0, 9120.0]
[32.0, 28.0, 27.0]
[229, 227, 229]
p02629
u514118270
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["import sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\ndef s(): return input()\ndef i(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef L(): return list(map(int,input().split()))\ndef l(): return list(map(int,input().split()))\ndef lcm(a,b): return a*b//math.gcd(a,b)\nsys.setrecursionlimit(10 ** 9)\nINF = 10**9\nmod = 10**9+7\n\nN = i()\nA = [26**i for i in range(1,30)]\nA = [0]+list(itertools.accumulate(A))\ncnt = 0\nfor i in range(N):\n if A[i] >= N:\n p = cnt\n break\n cnt += 1\nif p == 1:\n print(chr(N+96))\ns = []\nif N in A:\n print('z'*p)\n exit()\nfor i in range(p-1):\n s.append(chr(N%26+96))\n N = N//26\ns.append(chr(N+96))\ns.reverse()\nprint(''.join(s))", "import sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\ndef s(): return input()\ndef i(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef L(): return list(input().split())\ndef l(): return list(map(int,input().split()))\ndef lcm(a,b): return a*b//math.gcd(a,b)\nsys.setrecursionlimit(10 ** 9)\nmod = 10**9+7\n\nN = i()\nS = []\nfor i in range(1,100):\n if N < 27:\n break\n N -= 1\n S.append(chr(ord('a')+N%26))\n N = N//26\nS.append(chr(ord('a')+N-1))\nprint(''.join(S[::-1]))"]
['Runtime Error', 'Accepted']
['s949525531', 's256105363']
[10080.0, 10064.0]
[39.0, 35.0]
[816, 615]
p02629
u517681577
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nN = N-1\na = []\nwhile True:\n ans = divmod(N, 26)\n a.append(chr(ans[1]+97))\n if ans[0] < 1:\n break\n N = ans[0]\n\nwhile len(a) != 0:\n print(a.pop(), end='')", "N = int(input())\na = []\nwhile True:\n ans = divmod(N, 26)\n a.append(chr(ans[1]+96))\n if ans[0] < 1:\n break\n N = ans[0]\n\nwhile len(a) != 0:\n print(a.pop(), end='')", 'def Convert(n):\n if n <= 26:\n return chr(n+96)\n elif n % 26 == 0:\n return Convert(n//26 - 1) + chr(122)\n else:\n return Convert(n//26) + chr(n%26+96)\n\n\nN = int(input())\nprint(Convert(N))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s491151934', 's797193861', 's899776969']
[9148.0, 9076.0, 9108.0]
[28.0, 27.0, 28.0]
[191, 183, 215]
p02629
u519339498
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N=int(input())\nif N<=26:\n a=0\nelif N<= 702:\n N -=26\n a=1\nelif N<= 18278:\n N -=702\n a=2\nelif N<= 475254:\n N-=18278\n a=3\nelif N<= 12356630:\n N-=475254\n a=4\nelif N<= 321272406:\n N-=12356630\n a=5\nelif N <= 8353082582:\n N-= 321272406\n a=6\nelif N<= 217180147158:\n N-=8353082582\n a=7\nelif N <= 5646683826134:\n N-=21718014715\n a=8\nelif N<= 146813779479510:\n N-=5646683826134\n a=9\nelif N<= 3817158266467286:\n N-=146813779479510\n a=10\nelse:\n N-= 3817158266467286\n a=11\nmoji=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nfor x in range(a+1):\n b=N%26\n print(moji[b-1],end="")\n N -= 26**(x+1)', '\'\'\'\nCreated on 2020/08/31\n\n@author: harurun\n\'\'\'\ndef main():\n import sys\n pin=sys.stdin.readline\n pout=sys.stdout.write\n perr=sys.stderr.write\n\n N=int(pin())\n ans=""\n while N:\n N-=1\n ans+=chr(97+N%26)\n N=N//26\n print(ans[::-1])\n return\nmain()\n']
['Wrong Answer', 'Accepted']
['s176142926', 's463740381']
[9156.0, 9060.0]
[30.0, 33.0]
[665, 269]
p02629
u520843951
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nans = [\'\']\n\nquo = n\nrem = 0\n\nwhile True:\n rem = quo%26\n quo = quo//26\n if rem == 0:\n ans.insert(0, \'z\')\n if quo < 2:\n break\n else:\n \n if quo == 0:\n break\n\nprint(*ans, sep="")', 'n = int(input())\nans = [\'\']\n\nquo = n\nrem = 0\n\nwhile True:\n rem = quo%26\n quo = quo//26\n if rem == 0:\n ans.insert(0, \'z\')\n if quo < 2:\n break\n else:\n if ans[0] == \'z\' and rem == 1:\n ans.insert(0, \'z\')\n if quo < 2:\n break\n else:\n ans.insert(0, chr(rem+96))\n\n print(quo, rem)\n \n if quo == 0:\n break\n\nprint(*ans, sep="")', "n = int(input())\nans = ''\ncheck = 'abcdefghijklmnopqrstuvwxyz'\n\nwhile n != 0:\n n -= 1\n ans += check[n%26]\n n = n//26\n\nprint(ans[::-1])"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s812887676', 's865402843', 's951210549']
[9024.0, 9188.0, 9168.0]
[25.0, 31.0, 26.0]
[241, 431, 143]
p02629
u523087093
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["from collections import deque\n\nN = int(input())\namari = []\nwhile True: \n am = N % 26\n N = N // 26 \n amari.append(am)\n if N == 0:\n break\n\nanswer = deque()\nfor i in amari:\n answer.appendleft(chr(96+i))\n\nfor i in answer:\n print(i, end='')", "from collections import deque\n\nN = int(input())\namari = []\nwhile True: \n am = N % 26\n N = N // 26 \n amari.append(am)\n if N == 0:\n break\n\nanswer = deque()\nfor i in amari:\n if i == 0:\n i = 26\n answer.appendleft(chr(96+i))\n\nfor i in answer:\n print(i, end='')", "from collections import deque\n\nN = int(input())\namari = []\n\nif N <= 26:\n print(chr(96+N))\n\nelse:\n while True: \n N -= 1\n\n am = N % 26\n N = N // 26 \n amari.append(am)\n if N == 0:\n break\n\n answer = deque()\n for i in amari:\n answer.appendleft(chr(97+i))\n\n for i in answer:\n print(i, end='')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s524016504', 's936719722', 's475180140']
[9464.0, 9468.0, 9376.0]
[34.0, 32.0, 35.0]
[260, 290, 361]
p02629
u524513264
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nalfa = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w','x', 'y', 'z']\nre = []\nwhile n > 26:\n re.append(int(n % 26))\n n = int(n / 26)\nre.append(n % 26)\nprint(re)\nresult = ''\nfor i in range(len(re)):\n result += alfa[re[len(re)-i-1]-1]\nprint(result)\n", "n = int(input())\nalfa = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w','x', 'y', 'z']\nre = []\nwhile n > 26:\n re.append(int(n % 26))\n if int(n%26) == 0:\n n -= 1\n n = int(n / 26)\nre.append(n % 26)\nresult = ''\nfor i in range(len(re)):\n result += alfa[re[len(re)-i-1]-1]\nprint(result)\n"]
['Wrong Answer', 'Accepted']
['s471217903', 's091172580']
[9200.0, 9132.0]
[30.0, 31.0]
[340, 368]
p02629
u524534026
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['moji="abcdefghijklmnopqrstuvwxyz"\nN=int(input())\ndef f(N):\n if N<=26:\n return moji[n-1]\n return f(N//26)+moji[N%26-1]\n\nprint(f(N))\n ', 't="abcdefghijklmnopqrstuvwxyz"\nn=int(input())\ndef f(n):\n if n<=26:\n return t[n-1]\n return f((n-1)//26)+t[n%26-1]\n\nprint(f(n))\n ']
['Runtime Error', 'Accepted']
['s806888234', 's724700184']
[9040.0, 9048.0]
[28.0, 35.0]
[148, 143]
p02629
u524557016
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['# -*- coding: utf-8 -*-\nimport math\n\n\ndef to_char(n):\n return chr(ord("a") + int(n) - 1)\n\n\nN = int(input())\n\ndigit = math.ceil(math.log(N, 26))\n\nname = []\nrest = N\n\nfor i in reversed(range(digit)):\n dig_i = rest // math.pow(26, i)\n rest -= dig_i * math.pow(26, i)\n \n name.append(dig_i)\n\n[print(to_char(n), end="") for n in name]\n', '# -*- coding: utf-8 -*-\n\nN = int(input())\nM = 26\ndigit = 0\nN -= 1\n\nfor d in range(1, 12):\n if N < M ** d:\n digit = d - 1\n break\n N -= M ** d\n\nname = ""\n\nfor i in range(digit + 1):\n name += chr(ord("a") + (N % M))\n N //= M\n\nprint(name[::-1])\n']
['Wrong Answer', 'Accepted']
['s327106895', 's352715962']
[9444.0, 9148.0]
[29.0, 29.0]
[344, 267]
p02629
u536642030
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n=int(input())\n\ns = ''\nfor i in range(11):\n if N != 0:\n n -= 1\n s += chr(ord('a') + N % 26)\n n //= 26\nprint(s[::-1])", "n=int(input())\n\ns = ''\nfor i in range(11):\n if n != 0:\n n -= 1\n s += chr(ord('a') + n % 26)\n n //= 26\nprint(s[::-1])"]
['Runtime Error', 'Accepted']
['s880189597', 's396834265']
[9164.0, 9164.0]
[28.0, 32.0]
[126, 126]
p02629
u544272759
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = input()\nchars = "Xabcdefghijklmnopqrstuvwxyz"\nn_rem = n\nans = ""\n\nwhile True:\n x = n_rem % 26\n if x == 0:\n x = 26\n ans += chars[x]\n n_rem -= 26\n if n_rem == 0:\n break\n n_rem //= 26\nprint(ans[::-1])', 'n = input()\nchars = "Xabcdefghijklmnopqrstuvwxyz"\nn_rem = n\nans = ""\n \nwhile True:\n x = n_rem % 26\n if x == 0:\n x = 26\n ans += chars[x]\n n_rem -= x\n if n_rem == 0:\n break\n n_rem //= 26\nprint(ans[::-1])', 'n = int(input())\nchars = "Xabcdefghijklmnopqrstuvwxyz"\nn_rem = n\nans = ""\n \nwhile True:\n x = n_rem % 26\n if x == 0:\n x = 26\n ans += chars[x]\n n_rem -= x\n if n_rem == 0:\n break\n n_rem //= 26\n \nprint(ans[::-1])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s725252540', 's847610111', 's492976464']
[9112.0, 9088.0, 9164.0]
[28.0, 27.0, 30.0]
[213, 215, 223]
p02629
u544587633
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["#!/usr/bin/env python3\nimport sys\nimport string\n\nl = [None]+[c for c in string.ascii_lowercase]\ndef f(N: int):\n N -= 1\n if N // 26:\n return f(N//26) + l[N%26]\n else:\n return l[N%26]\n\ndef solve(N):\n print(f(N))\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens)) # type: int\n solve(N)\n\nif __name__ == '__main__':\n main()\n", "#!/usr/bin/env python3\nimport sys\nimport string\n\nl = [c for c in string.ascii_lowercase]\ndef f(N: int):\n N -= 1\n if N // 26:\n return f(N//26) + l[N%26]\n else:\n return l[N%26]\n\ndef solve(N):\n print(f(N))\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens)) # type: int\n solve(N)\n\nif __name__ == '__main__':\n main()\n"]
['Runtime Error', 'Accepted']
['s846640960', 's475713510']
[9916.0, 9916.0]
[40.0, 38.0]
[660, 653]
p02629
u548123110
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import string\ndef main():\n a = string.ascii_lowercase\n list = []\n num = int(input())\n\n while(num >= 0):\n list.append(num % 26)\n num = num // 26\n\n ans = []\n for i in range(1,len(list)+1):\n ans.append(a[list[len(list) - i] - 1])\n\n print(\'\'.join(ans))\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n a = [chr(ord(\'a\') + i) for i in range(26)]\n a.insert(0,"a")\n list = []\n num = int(input()) \n\n while(num > 0):\n if(num % 26 == 0):\n list.append(26)\n num = num // 26 -1\n continue\n else:\n list.append(num % 26)\n num = num // 26\n\n list.reverse()\n\n ans = []\n for i in range(0,len(list)):\n ans.append(a[list[i]])\n print(\'\'.join(ans))\n \n\n\nif __name__ == "__main__":\n main()']
['Time Limit Exceeded', 'Accepted']
['s489355771', 's667865111']
[202180.0, 9208.0]
[2211.0, 33.0]
[331, 483]
p02629
u551692187
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nN = int(input())\nprint(num2alpha(N))', 'def num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nN = int(input())\nprint(num2alpha(N).lower())']
['Wrong Answer', 'Accepted']
['s866498367', 's483104310']
[9080.0, 9056.0]
[28.0, 27.0]
[222, 230]
p02629
u552145906
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\n\na = N % 26\nb = N - a\nc = 0\nwhile(b >= 1):\n b = b/26\n c += 1\n a = b % 26\n b = b - a\nans = []\nfor d in range(c,-1,-1):\n dit = int(N/26**d)\n if N%26**d == 0 and d == c:\n continue\n if dit == 0:\n ans.append(chr(122))\n else:\n ans.append(chr(96+dit))\n N = N%26**d\nprint(''.join(ans))", 'def nu(num):\n if num<=26:\n return chr(96+num)\n elif num%26==0:\n return nu(num//26-1)+chr(122)\n else:\n return nu(num//26)+chr(96+num%26)\n\nprint(nu(int(input())))']
['Wrong Answer', 'Accepted']
['s643603972', 's821268463']
[9248.0, 8888.0]
[34.0, 31.0]
[346, 190]
p02629
u553308611
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\nname = []\nwhile N > 26:\n name.append(N%26)\n N = int(N / 26)\nname.append(N)\n\ndef swap(X):\n if X == 1:\n return "a"\n elif X == 2:\n return "b"\n elif X == 3:\n return "c"\n elif X == 4:\n return "d"\n elif X == 5:\n return "e"\n elif X == 6:\n return "f"\n elif X == 7:\n return "g"\n elif X == 8:\n return "h"\n elif X == 9:\n return "i"\n elif X == 10:\n return "j"\n elif X == 11:\n return "k"\n elif X == 12:\n return "l"\n elif X == 13:\n return "m"\n elif X == 14:\n return "n"\n elif X == 15:\n return "o"\n elif X == 16:\n return "p"\n elif X == 17:\n return "q"\n elif X == 18:\n return "r"\n elif X == 19:\n return "s"\n elif X == 20:\n return "t"\n elif X == 21:\n return "u"\n elif X == 22:\n return "v"\n elif X == 23:\n return "w"\n elif X == 24:\n return "x"\n elif X == 25:\n return "y"\n elif X == 0:\n return "z"\n\nswap_name = []\nfor i in range(len(name)):\n swap_name.append(swap(name[len(name)-i-1]))\nprint(*swap_name, sep="")\n\nprint(26**13)\n', 'N = int(input())\nname = []\nN = N - 1\nwhile N >= 26:\n name.append(N % 26)\n N = int(N / 26) - 1\nname.append(N)\n\ndef swap(X):\n if X == 0:\n return "a"\n elif X == 1:\n return "b"\n elif X == 2:\n return "c"\n elif X == 3:\n return "d"\n elif X == 4:\n return "e"\n elif X == 5:\n return "f"\n elif X == 6:\n return "g"\n elif X == 7:\n return "h"\n elif X == 8:\n return "i"\n elif X == 9:\n return "j"\n elif X == 10:\n return "k"\n elif X == 11:\n return "l"\n elif X == 12:\n return "m"\n elif X == 13:\n return "n"\n elif X == 14:\n return "o"\n elif X == 15:\n return "p"\n elif X == 16:\n return "q"\n elif X == 17:\n return "r"\n elif X == 18:\n return "s"\n elif X == 19:\n return "t"\n elif X == 20:\n return "u"\n elif X == 21:\n return "v"\n elif X == 22:\n return "w"\n elif X == 23:\n return "x"\n elif X == 24:\n return "y"\n elif X == 25:\n return "z"\n\nswap_name = []\nfor i in range(len(name)):\n swap_name.append(swap(name[len(name)-i-1]))\nprint(*swap_name, sep="")\n']
['Wrong Answer', 'Accepted']
['s497662320', 's405915189']
[9268.0, 9272.0]
[30.0, 34.0]
[1194, 1196]
p02629
u555458045
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nl = [0]\nans = []\na = 0\ncur = 1\nwhile a < 1000000000000001:\n a += 26**cur\n cur += 1\n l.append(a)\nl = list(reversed(l))\nfor i in range(len(l)-1):\n if l[i] >= n:\n ans.append(0)\n else:\n div = min((n-l[i+1]-1)//(l[i]-l[i+1]),26)\n n = n-div*(l[i]-l[i+1])\n ans.append(div)\nans.append(n)\nans =list(map(lambda x:x+96, ans))\nfor i in range(len(ans)):\n if ans[i] > 96:\n ans2 = ans[i:]\n break\nans2 = "".join([chr(i) for i in ans2])\nprint(n)\nprint(ans)\nprint(ans2)', 'n = int(input())\nl = [0]\nans = []\na = 0\ncur = 1\nwhile a < 1000000000000001:\n a += 26**cur\n cur += 1\n l.append(a)\nl = list(reversed(l))\nfor i in range(len(l)-1):\n if l[i] >= n:\n ans.append(0)\n else:\n div = min((n-l[i+1]-1)//(l[i]-l[i+1]),26)\n n = n-div*(l[i]-l[i+1])\n ans.append(div)\nans.append(n)\nans =list(map(lambda x:x+96, ans))\nfor i in range(len(ans)):\n if ans[i] > 96:\n ans2 = ans[i:]\n break\nans2 = "".join([chr(i) for i in ans2])\nprint(ans2)']
['Wrong Answer', 'Accepted']
['s321200869', 's355778739']
[9260.0, 9248.0]
[28.0, 33.0]
[492, 472]
p02629
u556594202
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import math\n\none = 1000000000000001\nketa= math.floor(math.log(one,26))\ndict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",\n 11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",\n 21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}\n\nn=int(input())\n\n\n\n\nans=[]\nfor i in range(1,keta+1):\n\n if (n-1) // 26**(i-1)==0:\n break\n\n str_num = ((n-1) // 26**(i-1) ) % 26 +1\n ans.append(dict[str_num])\nans=ans[::-1]\n\n\nfor str in ans:\n print(str,end="")\nif n==1:\n print("a")\n', 'import math\n\none = 1000000000000001\nketa= math.floor(math.log(one,26))\ndict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",\n 11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",\n 21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}\n\nn=int(input())\n\nans=[]\nfor i in range(1,keta+1):\n if (n-1) // 26**(i-1)==0:\n break\n\n str_num = (n // 26**(i-1) -1) % 26 +1\n ans.append(dict[str_num])\nans=ans[::-1]\n\n\nfor str in ans:\n print(str,end="")\nif n==1:\n print("a")\n', 'import math\n\n# one = 1000000000000001\ndict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",\n 11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",\n 21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}\n\nn=int(input())\n\nif n==1:\n print("a")\n exit()\n\nketa= math.floor(math.log(n-1,26))\n\nans=[]\nfor i in range(keta+1):\n\n if i==0:\n ans.append(dict[((n-1)//26**i)%26+1])\n else:\n ans.append(dict[((n-1)//26**i)%26])\n\nfor str in ans[::-1]:\n print(str,end="")\n', 'import math\n\n# one = 1000000000000001\ndict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",\n 11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",\n 21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}\n\nn=int(input())\nans = ""\n\nwhile n:\n ans = str(dict[(n-1)%26+1]) + ans\n n=(n-1)//26\n\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s307131886', 's337795174', 's482935140', 's401373800']
[9240.0, 9212.0, 9128.0, 9068.0]
[28.0, 27.0, 28.0, 26.0]
[605, 514, 515, 337]
p02629
u557792847
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import sys\nimport numpy as np\nimport math\nfrom collections import deque \nfrom functools import reduce\n\nn = int(input())\naz = "abcdefghijklmnopqrstuvwxyz"\ncnt = 12\nret = []\nama = n % 26\nna = n\nfor i in range(12, 0, -1):\n if 26**(i-1) > n:\n continue\n sho = na // (26**i)\n if sho > 0:\n ret.append(az[sho-1])\n else:\n if len(ret) > 0:\n ret.append(\'z\')\n na -= sho * (26**i)\nif (ret[0] == \'z\'):\n del ret[0]\nre = "".join(ret)\nprint(re)\n\n', "import sys\nimport numpy as np\nimport math\nimport collections\nfrom collections import deque \nfrom functools import reduce\n\n# input = sys.stdin.readline\nn = int(input())\nret = ''\nwhile(n > 0):\n n -= 1\n ret += chr(ord('a') + n % 26)\n n //= 26\nprint(ret[::-1])\n"]
['Runtime Error', 'Accepted']
['s633280959', 's658106700']
[27160.0, 27224.0]
[119.0, 115.0]
[479, 266]
p02629
u559126797
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\n\nAlphabet = "abcdefghijklmnopqrstuvwxyz"\n\nans = ""\n\nwhile N:\n ind = N%26\n ans = Alphabet[ind] + ans\n N = N//26\n\nprint(ans)', 'N = int(input())\n\nAlphabet = "abcdefghijklmnopqrstuvwxyz"\n\nans = ""\n\nwhile N:\n N -= 1\n ind = N%26\n ans = Alphabet[ind] + ans\n N = N//26\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s014227063', 's020007334']
[8948.0, 9164.0]
[28.0, 28.0]
[142, 151]
p02629
u559250296
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import math\nn=int(input())\np = []\nfor i in range(1,10**1000):\n if n / (26**i) >=1:\n if n%(26**i) ==0:\n p.append(chr(26+96))\n else:\n p.append(chr(n%(26**i)+96))\n\n else:\n if n%(26**i) ==0:\n p.append(chr(26+96))\n break\n else:\n p.append(chr(round(n/26)+96))\n break\np.reverse()\nprint("".join(p))\n\n', "N = int(input())\nans = ''\n for i in range(1, 99):\n\t if N <= 26 ** i:\n\t\t N -= 1\n\t\t for j in range(i):\n\t\t\t ans += chr(ord('a') + N % 26)\n\t\t\t N //= 26\n\t\t\tbreak\n\telse:\n\t\tN -= 26 ** i\nprint(ans[::-1]) \n", 'import math\nn=int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\nprint(num2alpha(n))\n', 'import math\nn=int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(97+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(122)\n else:\n return num2alpha(num//26)+chr(97+num%26)\nprint(num2alpha(n))\n', "N = int(input())\nans = ''\nfor i in range(1, 99):\n\tif N <= 26 ** i:\n\t\tN -= 1\n\t\tfor j in range(i):\n\t\t\tans += chr(ord('a') + N % 26)\n\t\t\tN //= 26\n\t\t\tbreak\n\telse:\n\t\tN -= 26 ** i\nprint(ans[::-1]) ", "N = int(input())\nans = ''\nfor i in range(1, 99):\n if N <= 26 ** i:\n N -= 1\n for j in range(i):\n ans += chr(ord('a') + N % 26)\n N //= 26\n break\n else:\n N -= 26 ** i\nprint(ans[::-1])\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s429323859', 's626040713', 's666645661', 's755381640', 's840150582', 's216070447']
[9196.0, 8904.0, 9136.0, 9176.0, 9072.0, 9176.0]
[30.0, 24.0, 29.0, 33.0, 31.0, 30.0]
[392, 215, 233, 234, 190, 237]
p02629
u559367141
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\n\nchars = "0abcdefghijklmnopqrstuvwxyz"\na = ""\nn = N\n\nwhile True:\n x = n_1 % 26\n\n if x == 0:\n x = 26\n\n a += chars[x]\n n_1 -= x\n if n_1 == 0:\n break\n\n n //= 26\n\nprint(n[::-1])', 'N = int(input())\n\nchars = "0abcdefghijklmnopqrstuvwxyz"\na = ""\nn = N\n\nwhile True:\n x = N % 26\n\n if x == 0:\n x = 26\n\n a += chars[x]\n n -= x\n if n == 0:\n break\n\n n //= 26\n\nprint(n[::-1])', 'N = int(input())\n\nchars = "Xabcdefghijklmnopqrstuvwxyz"\nresult = ""\nn_1 = N\n\nwhile True:\n x = n_1 % 26\n\n if x == 0:\n x = 26\n\n result += chars[x]\n n_1 -= x\n if n_1 == 0:\n break\n\n n_1 //= 26\n\nprint(result[::-1])\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s158776856', 's643062296', 's204280288']
[9140.0, 16396.0, 9020.0]
[27.0, 2206.0, 27.0]
[222, 216, 243]
p02629
u566428756
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N=int(input())\nans=''\n\nwhile N>0:\n N-=1\n print(N,N%26)\n ans+=chr(ord('a')+N%26)\n N//=26\n\nprint(ans[::-1])\n\n", "N=int(input())\nans=''\n\nwhile N>0:\n N-=1\n ans+=chr(ord('a')+N%26)\n N//=26\n\nprint(ans[::-1])\n\n"]
['Wrong Answer', 'Accepted']
['s609232610', 's374217539']
[9028.0, 9136.0]
[26.0, 30.0]
[119, 101]
p02629
u572179584
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nl = list()\nname_dict = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h', 9:'i', 10:'j', 11:'k', 12:'l', 13:'m', 14:'n', 15:'o', 16:'p', 17:'q', 18:'r', 19:'s', 20:'t', 21:'u', 22:'v', 23:'w', 24:'x', 25:'y', 26:'z'}\nname = ''\n\nwhile n != 0:\n\tl.append(n%26)\n\tn = n//26\n\nif not l:\n\tfor i in reversed(l):\n\t\tname += name_dict[i]\n\nprint(name)\n", "n = int(input())\nl = list()\nname_dict = {0:'a', 1:'b', 2:'c', 3:'d', 4:'e', 5:'f', 6:'g', 7:'h', 8:'i', 9:'j', 10:'k', 11:'l', 12:'m', 13:'n', 14:'o', 15:'p', 16:'q', 17:'r', 18:'s', 19:'t', 20:'u', 21:'v', 22:'w', 23:'x', 24:'y', 25:'z'}\nname = ''\n\nwhile n != 0:\n\tn -= 1\n\tl.append(n%26)\n\tn = n//26\n\nif l != []:\n\tfor i in reversed(l):\n\t\tname += name_dict[i]\n\nprint(name)\n"]
['Wrong Answer', 'Accepted']
['s931763675', 's263328515']
[9124.0, 9220.0]
[32.0, 28.0]
[362, 371]
p02629
u573332356
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['from string import ascii_lowercase\nN = int(input())\n\nk = [0, 26]\nfor i in range(1, 13):\n k.append(26 * (k[i] + 1))\n\n for i in range(13):\n if k[i] + 1 <= N <= k[i+1]:\n n = N - (k[i] + 1)\n for j in range(i, -1, -1):\n print(ascii_lowercase[(n//26**j) % 26], end="")\n', '\nfrom string import ascii_lowercase\nN = int(input())\n \nk = [0, 26]\nfor i in range(1, 13):\n k.append(26 * (k[i] + 1))\n \n for i in range(13):\n if k[i] + 1 <= N <= k[i+1]:\n n = N - (k[i] + 1)\n \n for j in range(i, -1, -1):\n print(ascii_lowercase[(n//26**j) % 26], end="")\n', 'N = int(input())\nL = list("abcdefghijklmnopqrstuvwxyz")\na = 1\nwhile N > 26**a:\n N = N - 26**a\n a += 1\n \npre = []\nfor i in reversed(range(1,a)):\n r = (N-1) // 26**i\n pre.append(r)\n N = int(N%(26**i))\n \nans = \'\'\nfor i in pre:\n ans += L[i]\nprint(ans+L[N-1])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s430848310', 's567132964', 's427968778']
[9796.0, 9984.0, 9136.0]
[34.0, 34.0, 30.0]
[313, 302, 272]
p02629
u573536767
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n############################\n\nimport numpy as np\n\nn = int(input())\n\nprint (n)\nx = num2alpha(n).lower()\nprint (x)\n', '\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n############################\n\nimport numpy as np\n\nn = int(input())\n\nx = num2alpha(n).lower()\nprint (x)']
['Wrong Answer', 'Accepted']
['s477570729', 's145703471']
[27140.0, 27080.0]
[117.0, 125.0]
[334, 323]
p02629
u575956662
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\na = 0\nAns_list = []\nalpha = ["a","b","c","d","e","f","g","h","i",\'j\',"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nqq = n % 26\nif qq == 0:\n qq = 26\nAns_list.insert(0,qq)\nb = n - qq\nfor i in range(10):\n po = b // 26\n po2 = po % 26\n if po2 == 0:\n po2 = 26\n Ans_list.insert(0,po2)\n b = po - po2\n if b == 0:\n break\nAns = ""\nfor i in range(len(Ans_list)):\n Ans = Ans + alpha[Ans_list[i]-1]\nprint(Ans)', 'n = int(input())\na = 0\nAns_list = []\nalpha = ["a","b","c","d","e","f","g","h","i",\'j\',"k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nqq = n % 26\nif qq == 0:\n qq = 26\nAns_list.insert(0,qq)\nb = n - qq\nfor i in range(10000):\n po = b // 26\n po2 = po % 26\n if po2 == 0:\n po2 = 26\n Ans_list.insert(0,po2)\n b = po - po2\n if b <= 0:\n break\nAns = ""\nif n <= 26:\n del Ans_list[0]\nfor i in range(len(Ans_list)):\n Ans = Ans + alpha[Ans_list[i]-1]\nprint(Ans)']
['Wrong Answer', 'Accepted']
['s856677323', 's048449551']
[9228.0, 9160.0]
[31.0, 34.0]
[470, 505]
p02629
u579025969
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['\n# Python 3 program to implement \n# the above approach \nfrom math import pow\n \n# Function to calculate number of characters \n# in corresponding string of \'A\' and \'B\' \ndef no_of_characters(M): \n \n # Since the minimum number \n # of characters will be 1 \n k = 1\n \n # Calculating number of characters \n while (True): \n \n # Since k length string can \n # represent at most pow(2, k+1)-2 \n # that is if k = 4, it can \n # represent at most pow(2, 4+1)-2 = 30 \n # so we have to calculate the \n # length of the corresponding string \n if (pow(2, k + 1) - 2 < M): \n k += 1\n else: \n break\n \n # return the length of \n # the corresponding string \n return k \n \n# Function to print corresponding \n# string of \'A\' and \'B\' \ndef print_string(M): \n \n # Find length of string \n k = no_of_characters(M) \n \n # Since the first number that can be \n # represented by k length string will \n # be (pow(2, k)-2)+1 and it will be \n # AAA...A, k times, therefore, N will \n # store that how much we have to print \n N = M - (pow(2, k) - 2) \n \n # At a particular time, \n # we have to decide whether \n # we have to print \'A\' or \'B\', \n # this can be check by calculating \n # the value of pow(2, k - 1) \n while (k > 0): \n num = pow(2, k - 1) \n \n if (num >= N): \n print("A", end = "") \n else: \n print("B", end = "") \n N -= num \n k -= 1\n \n print("\\n", end = "") \n \n\nM=input()\nprint_string(M)', "n = int(input())\nascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'\ns = ''\nwhile n>0:\n n -= 1\n i = n % 26\n s += ascii_lowercase[i]\n n = n // 26\nout = s[::-1]\nprint(out)"]
['Runtime Error', 'Accepted']
['s088729465', 's142002867']
[9232.0, 9116.0]
[28.0, 33.0]
[1599, 176]
p02629
u587589241
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input()) ans='' whileN>0:\nN -= 1\nans += chr(ord('a') + N % 26) N //= 26\nprint(ans[::-1])", 'N = int(input()) \nans=""\nwhile N>0:\n N -= 1\n ans += chr(ord(\'a\') + N % 26) \n N //= 26\nprint(ans[::-1])\n']
['Runtime Error', 'Accepted']
['s621068197', 's153602124']
[9012.0, 9144.0]
[26.0, 25.0]
[96, 112]
p02629
u589361760
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nprint(num2alpha(n))', 'n = int(input())\ndef num2alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(64+num%26)\n\nm = num2alpha(n).lower()\nprint(m)']
['Wrong Answer', 'Accepted']
['s612690210', 's130838391']
[9140.0, 9184.0]
[36.0, 30.0]
[223, 237]
p02629
u591808161
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['\nimport sys\ninput = sys.stdin.readline\n \ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\nnum = I()\nresult = ""\nalphabet = [chr(ord(\'a\') + i) for i in range(26)]\n\nwhile True:\n result = alphabet[num % 27 - 1] + result\n num = num // 27\n if num == 0:\n break\nprint(result, end = \'\')\n', '\nimport sys\ninput = sys.stdin.readline\n \ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\nnum = I()\nresult = ""\nalphabet = [chr(ord(\'a\') + i) for i in range(26)]\n\nwhile True:\n result = alphabet[num % 26 - 1] + result\n num = num // 26\n if num == 0:\n break\n\nprint(result, end = \'\')', '\nimport sys\ninput = sys.stdin.readline\n \ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\nnum = I()\nresult = ""\nalphabet = [chr(ord(\'a\') + i) for i in range(26)]\n\nwhile True:\n num -= 1\n result = alphabet[num % 26] + result\n num //= 26\n if num == 0:\n break\nprint(result)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s242168194', 's530804131', 's914994728']
[8992.0, 9024.0, 9196.0]
[30.0, 31.0, 30.0]
[384, 384, 377]
p02629
u593019570
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nm = n\n\ncount = 0\nfor i in range(1,100):\n if n >= 26 ** i:\n n = n - 26 ** i\n count += 1\n else:\n break\n\na = []\nb = list(\'abcdefghijklmnopqrstuvwxyz\')\n#print(n,count,n // (26 ** A5))\ncount2 = 0\nif n < 26:\n a.append(n-1)\n\nwhile 1:\n #print(n)\n if n < 26:\n a.append(n-1)\n break\n \n count2 = n // (26 ** count)\n n = n % 26 ** count\n if n < 26 ** count:\n a.append(count2)\n count -= 1\n if count == 0:\n a.append(n-1)\n break\n#print(n)\nx = [b[a[i]]for i in range(len(a))]\nprint("".join(x))\n\n', 'n = int(input())\nm = n\n\ncount = 0\nfor i in range(1,100):\n if n >= 26 ** i:\n n = n - 26 ** i\n count += 1\n else:\n break\n\na = []\nb = list(\'abcdefghijklmnopqrstuvwxyz\')\n#print(n,count,n // (26 ** A5))\ncount2 = 0\nwhile 1:\n #print(n)\n count2 = n // (26 ** count)\n n = n % 26 ** count\n if n < 26 ** count:\n a.append(count2)\n count -= 1\n if count == 0:\n a.append(n-1)\n break\n#print(n)\nx = [b[a[i]]for i in range(len(a))]\nprint("".join(x))\n\n', 'n = int(input()) - 1\n\na = []\nb = list(\'abcdefghijklmnopqrstuvwxyz\')\n\nif n <= 25:\n print(b[n])\n exit()\ncount = 0\nfor i in range(1,100):\n if n >= 26 ** i:\n n = n - 26 ** i\n count += 1\n else:\n break\n\n\n#print(n,count,n // (26 ** A5))\ncount2 = 0\n\n\nwhile 1:\n #print(n)\n #print(n,count,a)\n if count == 0:\n a.append(n)\n break\n count2 = n // (26 ** count)\n n = n % 26 ** count\n a.append(count2)\n count -= 1\n\n#print(n)\nx = [b[a[i]]for i in range(len(a))]\nprint("".join(x))\n\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s515854777', 's793291748', 's481611247']
[9204.0, 9364.0, 9212.0]
[32.0, 31.0, 32.0]
[588, 498, 532]
p02629
u594803920
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["from copy import copy\nimport math\nn = int(input())\nans = ''\nalp = 'abcdefghijklmnopqrstuvwxyz'\ncnt = 0\nres = [0] * 11\nfor i in range(1, 11):\n res[i] = res[i-1] + 26**i\nketa = 1\nprint(res)\nfor i in range(11):\n if n > res[i]:\n keta = i\n\nn -= res[keta]\nwhile n > 1:\n k = n%26\n n //= 26\n ans = ans + alp[k-1]\nif keta - len(ans)+1> 0:\n ans = 'a' * (keta-len(ans)+1) + ans\nprint(ans)", "# from copy import copy\nimport math\nn = int(input())\nans = ''\nalp = 'abcdefghijklmnopqrstuvwxyz'\ncnt = 0\nres = [0] * 11\nfor i in range(1, 11):\n res[i] = res[i-1] + 26**i\nketa = 1\n#print(res)\nfor i in range(11):\n if n > res[i]:\n keta = i\n\nn -= res[keta]\n#print(n)\n\nimport numpy as np\naaa = np.base_repr(n-1,26)\n#print(aaa)\naaa = str(aaa)\ndi = {'0':'a', '1':'b','2':'c','3':'d','4':'e','5':'f','6':'g','7':'h','8':'i','9':'j','A':'k','B':'l','C':'m','D':'n','E':'o','F':'p','G':'q','H':'r','I':'s','J':'t','K':'u','L':'v','M':'w','N':'x','O':'y','P':'z'}\nfor i in range(len(str(aaa))):\n ans = ans + di[aaa[i]]\nif keta+1 - len(ans) > 0:\n ans = 'a' * (keta+1 - len(ans) ) + ans\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s011098644', 's506664981']
[9360.0, 28032.0]
[31.0, 248.0]
[421, 1048]
p02629
u595289165
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['w = int(input())\nn = w\nans = ""\n\n\ndef letter(i):\n if i == 0:\n return "z"\n return chr(i+96)\n\n\ncnt = 26**30\ncheck = -1\nflg = False\nfor t in range(31):\n if cnt > n:\n if not flg:\n cnt //= 26\n continue\n if not flg:\n check = 30-t\n flg = True\n y = n // cnt\n n -= y * cnt\n ans += letter(y)\n\nif 26**check <= w < 26**(check+1):\n print(ans[1:])\nelse:\n print(ans)', 'def answer(n):\n if n <= 26:\n return chr(n-1 + 97)\n r = n % 26 - 1\n if r == -1:\n r += 26\n return answer((n-r) // 26) + chr(r + 97)\n\n\nn = int(input())\nprint(answer(n))']
['Wrong Answer', 'Accepted']
['s760938039', 's024515678']
[9208.0, 9092.0]
[30.0, 29.0]
[428, 191]
p02629
u597455618
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\ns = [chr(ord("a")+i) for i in range(26)]\nnum = [26**i for i in range(1, 12)]\nnum, i = 26, 1\nwhile n - num > 0:\n i += 1\n num += pow(26, i)\nprint(num)\nans = ""\nwhile i > 0:\n tmp = 0\n for j in range(1, 27):\n if n - j*pow(26, i-1) < 0:\n break\n tmp = j\n ans += s[tmp- 1]\n n -= tmp*pow(26, i-1)\n i -= 1\nprint(ans)', 'n = int(input()) - 1\nans = ""\nfor _ in range(13):\n ans += chr(ord("a") + (n%26))\n n //= 26\n if n == 0:\n break\n n -= 1\nprint(ans[::-1])']
['Wrong Answer', 'Accepted']
['s672721669', 's683135278']
[9220.0, 8868.0]
[32.0, 33.0]
[370, 153]
p02629
u601159375
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import itertools\nimport string\n\nn = int(input())\nalphabets = string.ascii_lowercase\n\ndigit = 0\ncounter = 0\nwhile counter < n:\n\tdigit += 1\n\tcounter += 26**digit\n\nanswer = ""\nfor d in range(digit):\n\tprint(f\'{d} {n}\')\n\tif d == 0:\n\t\talphabet = n % 26 - 1\n\t\tanswer = alphabets[alphabet] + answer\n\t\tn = n - (n % 26)\n\telse:\n\t\tn = n // 26\n\t\talphabet = n % 26 - 1\n\t\tanswer = alphabets[alphabet] + answer\n\t\tn = n - (n % 26)\n\nprint(answer)', 'import itertools\nimport string\n\nn = int(input())\nalphabets = string.ascii_lowercase\n\ndigit = 0\ncounter = 0\nwhile counter < n:\n\tdigit += 1\n\tcounter += 26**digit\n\nanswer = ""\nfor d in range(digit):\n\tif d == 0:\n\t\talphabet = n % 26 - 1\n\t\tif alphabet == -1:\n\t\t\talphabet = 25\n\t\tanswer = alphabets[alphabet] + answer\n\t\tn = n - alphabet\n\telse:\n\t\tn = n // 26\n\t\talphabet = n % 26 - 1\n\t\tif alphabet == -1:\n\t\t\talphabet = 25\n\t\tanswer = alphabets[alphabet] + answer\n\t\tn = n - alphabet\n\nprint(answer)']
['Wrong Answer', 'Accepted']
['s793630357', 's191961423']
[9892.0, 9788.0]
[37.0, 38.0]
[429, 486]
p02629
u601426916
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\ns = ""\nwords = "abcdefghijklmnopqrstuvwxyz"\nwhile N > 0:\n if N%26 == 0:\n amari = 26\n else:\n amari = N%26\n if N > 26:\n N = (N-N%26)/26\n else:\n N = N-26\n print(N)\n print(amari)\n s = words[int(amari-1)]+s\nprint(s)', 'N = int(input())\ns = ""\nwords = "abcdefghijklmnopqrstuvwxyz"\nwhile N > 0:\n if N%26 == 0:\n amari = 26\n else:\n amari = N%26\n if N > 26:\n N = (N-amari)/26\n else:\n N = N-26\n print(N)\n print(amari)\n s = words[int(amari-1)]+s\nprint(s)', 'N = int(input())\ns = ""\nwords = "abcdefghijklmnopqrstuvwxyz"\nN = N-1\nwhile N > 0:\n amari = N%26\n if N >= 26:\n N = (N-N%26)/26-1\n else:\n N = N-26\n print(N)\n print(amari)\n s = words[int(amari)]+s\nprint(s)', 'N = int(input())\ns = ""\nwords = "abcdefghijklmnopqrstuvwxyz"\nwhile N > 0:\n if N%26 == 0:\n amari = 26\n else:\n amari = N%26\n if N > 26:\n N = (N-amari)/26\n else:\n N = N-26\n s = words[int(amari-1)]+s\nprint(s)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s166933699', 's317457854', 's730126795', 's893602573']
[9152.0, 9000.0, 9244.0, 9164.0]
[28.0, 31.0, 26.0, 29.0]
[276, 277, 234, 247]
p02629
u604055101
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nh = []\nna = ["a","b", "c", "d", "e", "f", "g",\n "h", "i", "j", "k", "l", "m", "n", "o", "p", "q",\n "r", "s", "t", "u", "v", "w", "x", "y", "z"]\nname = ""\n\nif n < 26:\n h.append(n)\nelse:\n while n >= 27:\n tmp = n%26\n n //= 26\n h.append(tmp)\n print(n)\n\n print(n)\n if n != 0:\n h.append(n)\n\nh = h[::-1]\nif h[-1] == 0:\n h.pop(-1)\n for i in h:\n name += na[-i]\nelse:\n for i in h:\n name += na[-i-1]\n\nprint(name)', 'n = int(input())\nh = []\ntmp = ["a", "b", "c", "d", "e", "f", "g", "h","i", \n "j", "k", "l", "m", "n", "o", "p", "q","r",\n "s", "t", "u", "v", "w", "x", "y", "z"]\nname = ""\n\nwhile n != 0:\n mod = n % 26\n h.append(mod)\n n //= 26\n if mod == 0:\n n -= 1\nfor i in h.__reversed__():\n name += tmp[i - 1]\nprint(name)\n']
['Runtime Error', 'Accepted']
['s902499897', 's507834673']
[9144.0, 9072.0]
[33.0, 28.0]
[502, 343]
p02629
u604839890
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\n\nabc = 'abcdefghijklmnopqrstuvwxyz'\ns = ''\nwhile n > 0:\n n -= 1\n n, mod = divmod(n, 26)\n s += a[mod]\nprint(s[::-1])", "n = int(input())\n\nabc = 'abcdefghijklmnopqrstuvwxyz'\ns = ''\nwhile n > 0:\n n -= 1\n n, mod = divmod(n, 26)\n s += abc[mod]\nprint(s[::-1])"]
['Runtime Error', 'Accepted']
['s409527192', 's652537532']
[9092.0, 9088.0]
[27.0, 27.0]
[141, 143]
p02629
u606090886
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\na = []\nwhile n > 0:\n n -= 1\n a.append(n%26)\n n = n // 26\nans = ""\nprint(a)\nfor i in range(len(a)):\n ans += chr(ord("a")+a[(-1)*(i+1)])\nprint(ans)', 'n = int(input())\na = []\nwhile n > 0:\n n -= 1\n a.append(n%26)\n n = n // 26\nans = ""\nfor i in range(len(a)):\n ans += chr(ord("a")+a[(-1)*(i+1)])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s761653605', 's687991925']
[9128.0, 9112.0]
[29.0, 30.0]
[174, 165]
p02629
u609314165
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nans = ''\nwhile N > 0:\nN -= 1\nans += chr(ord('a') + N % 26)\nN //= 26\nprint(ans[::-1])", "N = int(input())\nans = ''\nfor i in range(1, 99):\n\tif N <= 26 ** i:\n\t\tN -= 1\n\t\tfor j in range(i):\n\t\t\tans += chr(ord('a') + N % 26)\n\t\t\tN //= 26\n\t\tbreak\n\telse:\n\t\tN -= 26 ** i\nprint(ans[::-1]) # reversed"]
['Runtime Error', 'Accepted']
['s622603487', 's846529015']
[9016.0, 9148.0]
[26.0, 29.0]
[101, 199]
p02629
u613920660
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def main():\n #input\n N=int(input())\n l=list("zabcdefghijklmnopqrstuvwxy")\n\n name=[]\n n=N\n while n>=26:\n mod=n%26\n if mod!=0:\n n//=26\n else:\n n//=26\n n-=1\n name.append(l[mod])\n if mod!=0:\n name.append(l[n])\n name=[name[n] for n in reversed(range(len(name)))]\n print("".join(name))\n\nif __name__=="__main__":\n main()', 'def main():\n #input\n N=int(input())\n l=list("abcdefghijklmnopqrstuvwxyz")\n n=N\n name=""\n while n>=26:\n n-=1\n name+=l[n%26]\n n//=26\n if n!=0:\n name+=l[n-1]\n print(name[::-1])\n\nif __name__=="__main__":\n main()']
['Runtime Error', 'Accepted']
['s509121101', 's544031416']
[9208.0, 9180.0]
[30.0, 30.0]
[410, 275]
p02629
u614181788
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nans = []\n\ns == 0\nwhile 1:\n if s == 1 and n < 1:\n break\n s = 1\n if n%26 == 0:\n ans.append(0)\n else:\n ans.append(n%26)\n n -= n%26\n n = n//26\nfor i in range(len(ans)):\n if i != len(ans)-1:\n if ans[i] <= 0:\n ans[i+1] -= 1\n ans[i] += 26\n else:\n if ans[i] <= 0:\n del ans[i]\nans = ans[::-1]\nfor i in range(len(ans)):\n print(chr(96+ans[i]),end="")\nprint("")', 'n = int(input())\nans = []\n\ns = 0\nwhile 1:\n if s == 1 and n < 1:\n break\n s = 1\n if n%26 == 0:\n ans.append(0)\n else:\n ans.append(n%26)\n n -= n%26\n n = n//26\nfor i in range(len(ans)):\n if i != len(ans)-1:\n if ans[i] <= 0:\n ans[i+1] -= 1\n ans[i] += 26\n else:\n if ans[i] <= 0:\n del ans[i]\nans = ans[::-1]\nfor i in range(len(ans)):\n print(chr(96+ans[i]),end="")\nprint("")']
['Runtime Error', 'Accepted']
['s662905699', 's276411991']
[9208.0, 9232.0]
[29.0, 32.0]
[461, 460]
p02629
u618363477
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["1 N = int(input())\n2 ans = ''\n3 while N > 0:\n4 N -= 1\n5 ans += chr(ord('a') + N % 26)\n6 N //= 26\n7 print(ans[::-1])", "N = int(input())\nans = ''\nfor i in range(1, 99):\n if N <= 26 ** i:\n \tN -= 1\n for j in range(i):\n \tans += chr(ord('a') + N % 26)\n \tN //= 26\n \tbreak\n else:\n \tN -= 26 ** i\n \tprint(ans[::-1]) ", 'N = int(input())\nans = ""\nfor i in range(1,99):\n if N<=26**i:\n N-=1\n for j in range(i):\n ans += chr(ord("a")+ N%26)\n N//=26\n break\n else:\n N-=26**i\nprint(ans[::-1])']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s481923450', 's538373983', 's759544589']
[8716.0, 9180.0, 8988.0]
[27.0, 27.0, 30.0]
[115, 188, 220]
p02629
u619557935
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['\ndef Base_10_to_n(X, n):\n X -= 1\n if (int(X/n)):\n return Base_10_to_n((X)//n, n) + str(X%n) + " "\n return str(X%n) + " "\n############################\n\ndef nanketa(X):\n n = 1\n a = 0\n while X > (26 ** n) + a:\n a += 26 ** n\n n += 1\n return n\n\n\n\n\nx10 = int(input())\nx2 = Base_10_to_n(x10, 26)\n##print(x2)\nans = ""\na = ""\ncnt = 0\nx2 = list(x2.split(" "))[:-1]\nx2 = list(map(int, x2))\n#if x2[-1] == 25:\n #x2[-1] = -1\n#x2[-1] += 1\nprint(x2)\nfor x in x2:\n ans += chr(x + 97)\n\nprint(ans)', '\ndef Base_10_to_n(X, n):\n if (int(X/n)):\n return Base_10_to_n(int((X-1)/n), n)+str((X-1)%n) + " "\n return str((X-1)%n) + " "\n############################\n\n\n\nx10 = int(input())\nx2 = Base_10_to_n(x10, 26)\nans = ""\na = ""\nprint(x2)\nfor x in x2:\n if x == " ":\n ans += chr(int(a) + 97)\n a = ""\n continue\n a += x\n\nprint(ans)', '\ndef Base_10_to_n(X, n):\n X -= 1\n if (int(X/n)):\n return Base_10_to_n((X)//n, n) + str(X%n) + " "\n return str(X%n) + " "\n############################\n\ndef nanketa(X):\n n = 1\n a = 0\n while X > (26 ** n) + a:\n a += 26 ** n\n n += 1\n return n\n\n\n\n\nx10 = int(input())\nx2 = Base_10_to_n(x10, 26)\n##print(x2)\nans = ""\na = ""\ncnt = 0\nx2 = list(x2.split(" "))[:-1]\nx2 = list(map(int, x2))\n#if x2[-1] == 25:\n #x2[-1] = -1\n#x2[-1] += 1\n##print(x2)\nfor x in x2:\n ans += chr(x + 97)\n\nprint(ans)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s311718839', 's407772821', 's831256437']
[9228.0, 9196.0, 9224.0]
[30.0, 32.0, 28.0]
[643, 471, 645]
p02629
u620944332
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import string\nalphabets = "abcdefghijklmnopqrstuvwxyz"\nn = 26\n\nans = \'\'\ntmp = int(input())\nwhile tmp >= n:\n tmp -= 1\n idx = tmp % n\n ans = alphabets[idx] + ans\n tmp //= n\nprint(ans)\n', 'import string\nalphabets = "abcdefghijklmnopqrstuvwxyz"\nn = 26\n\nans = \'\'\ntmp = int(input())\nwhile tmp > 0:\n tmp -= 1\n idx = tmp % n\n ans = alphabets[idx] + ans\n tmp //= n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s219724061', 's298346965']
[9768.0, 9972.0]
[41.0, 39.0]
[194, 193]
p02629
u624613992
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nans = []\nalp = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\',\n \'w\', \'x\', \'y\', \'z\']\nwhile True:\n a,b = divmod(n,26)\n if a >= 26:\n ans.append(alp[b - 1])\n n = a\n else:\n ans.append(alp[b - 1])\n ans.append(alp[a - 1])\n break\n\nans = ans[::-1]\nprint("".join(ans))', 'n = int(input())\nans = []\nalp = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\',\n \'w\', \'x\', \'y\', \'z\']\nwhile True:\n a,b = divmod(n,26)\n ans.append(alp[b - 1])\n if a >= 26:\n n = a\n else:\n ans.append("a")\n break\n\nans = ans[::-1]\nprint("".join(ans))\n', 'n = int(input())\ntimes = 1 \nlast = 0\nfor i in range(100):\n if 26 ** times + last >= n:\n break\n else:\n last += 26 ** times\n times+=1\nalp = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\', \'w\', \'x\', \'y\', \'z\']\nfor i in range(times,0,-1):\n a,b = divmod(n,26)\n print(alp[b-1],end="")\n n -= a * 26 ** i', 'ALPHABET = "abcdefghijklmnopqrstuvwxyz"\n\ndef alphabet_decimal(v):\n def convert(v):\n while v > 0:\n yield ALPHABET[(v - 1) % len(ALPHABET)]\n v = (v - 1) // len(ALPHABET)\n return \'\'.join(convert(v))[::-1]\nv =int(input())\nprint(alphabet_decimal(v))']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s336991779', 's937619098', 's945810661', 's902458044']
[9212.0, 9016.0, 9168.0, 9100.0]
[32.0, 31.0, 34.0, 31.0]
[388, 347, 415, 279]
p02629
u630171206
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nal = 26\ni = 1\nwhile N > al**i:\n N -= al**(i)\n i += 1\nans = ''\na = ord('a')\nwhile i > 0:\n ans += chr(a + N // al**i)\n N %= al**i\n print(N)\n i -= 1\nprint(ans[::-1])", "N = int(input())\nal = 26\ni = 1\nwhile N > al**i:\n N -= al**(i)\n i += 1\nans = ''\nprint(N)\na = ord('a')\nwhile i > 0:\n ans += chr(a + (N-1) // al**(i-1))\n N %= al**(i-1)\n i -= 1\nprint(ans)", "N = int(input())\nal = 26\ni = 1\nwhile N > al**i:\n N -= al**(i)\n i += 1\nans = ''\na = ord('a')\nwhile i > 0:\n ans += chr(a + N // al**i)\n N %= al**i\n i -= 1\nprint(ans[::-1])", "N = int(input())\nal = 26\ni = 1\nwhile N > al**i:\n N -= al**(i)\n i += 1\nans = ''\na = ord('a')\nwhile i > 0:\n ans += chr(a + (N-1) // al**(i-1))\n N = (N-1) % al**(i-1) + 1\n i -= 1\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s123364498', 's572539992', 's591956969', 's118137614']
[8948.0, 9196.0, 9196.0, 9184.0]
[29.0, 36.0, 33.0, 30.0]
[197, 199, 184, 201]
p02629
u630467326
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["from decimal import Decimal\n\nn = int(input())\nalpha_list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', \n 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\nans = ''\n\n\nwhile(n > 0):\n Decimal(n) - Decimal(1)\n ans += alpha_list[int(Decimal(n) % Decimal(26))]\n n = int(Decimal(n) // Decimal(26))\n \nprint(ans[::-1])", "n = int(input())\nans = ''\n\nwhile n > 0:\n n -= 1\n ans += chr(ord('a') + (n % 26))\n n //= 26\nprint(ans[::-1])"]
['Wrong Answer', 'Accepted']
['s404586356', 's455187057']
[10060.0, 9144.0]
[35.0, 31.0]
[363, 110]
p02629
u636256839
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def num_to_lett(num):\n string = ""\n while num > 0:\n num, remainder = divmod(num - 1, 26)\n string = chr(65 + remainder) + string\n return string.lower()\n\n\nprint(num_to_lett(27))\n', 'num = int(input())\nletter = ""\nwhile num > 0:\n num, remainder = divmod(num - 1, 26)\n letter = chr(65 + remainder) + letter\nprint(letter.lower())\n']
['Wrong Answer', 'Accepted']
['s977512565', 's378587012']
[9088.0, 9120.0]
[29.0, 30.0]
[199, 151]
p02629
u642528832
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nchars = 'Xabcdefghijklmnopqrstuvwxyz'\nres = ''\nwhile True:\n x = n%26 \n if x == 0:\n x = 26\n res += chars[x]\n n -= x\u3000\n if n == 0 :\n break\n n //= 26 \n \nprint(res[::-1])", "n = int(input())\nchars = 'Xabcdefghijklmnopqrstuvwxyz'\nres = ''\nwhile True:\n x = n%26 \n if x == 0: \n x = 26\n res += chars[x] \n n -= x \n if n == 0 :\n break\n n //= 26 \n\nprint(res[::-1])"]
['Runtime Error', 'Accepted']
['s439705424', 's343888226']
[9024.0, 9132.0]
[29.0, 30.0]
[751, 747]
p02629
u647796955
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N=702\ndic= ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\nK = 0\nwhile N > 26**K:\n K+=1\n\nK-=1\nidx = []\nans = ''\nfor n in range(K):\n print(N)\n base = 26**(K-n)\n a = N // base\n N -= a * base\n ans += dic[a-1]\n \n \nif N > 0:\n ans += dic[N-1]\nprint(ans)\n", "N=int(input())\ndic= ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\n\nN -=1\nans = ''\nwhile N >= 26:\n a = N%26\n N = N//26 -1\n ans = dic[a] + ans\n \n\nans = dic[N] + ans \nprint(ans)"]
['Wrong Answer', 'Accepted']
['s035328887', 's501384648']
[9168.0, 9112.0]
[32.0, 27.0]
[333, 247]
p02629
u654240084
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nans = ''\nwhile n > 0:\n ans += chr(ord('a') + n % 26)\n n //= 26\nprint(ans[::-1])\n", "n = int(input())\nans = ''\nwhile n > 0:\n n -= 1\n ans += chr(ord('a') + n % 26)\n n //= 26\nprint(ans[::-1])\n"]
['Wrong Answer', 'Accepted']
['s759364699', 's624435818']
[9164.0, 9096.0]
[31.0, 29.0]
[103, 114]
p02629
u655048024
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['al = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nN = int(input())\nM = N\nv = 1\nwhile True:\n if(M<26**v):\n break\n v += 1\nif(v>=2):\n N -= 26**(v-1)\nans = []\nfor i in range(v):\n ans.append("a")\nfor i in range(v):\n ans[-i-1]=al[N%26]\n N = N//26\nans.reverse()\nanss = ""\nfor i in range(len(ans)):\n anss += ans[-i-1]\nprint(anss)\n \n\n', 'n = int(input())\nh = 26\ni = 2\nwhile(True):\n if(n<=h):\n break\n h+= 26**i\n i+=1\ni -= 1\nn = 26**i\nprint(i)\nalp = "abcdefghijklmnopqrstuvwxyz"\nans = []\nfor j in range(i):\n ans.append(alp[n%26-1])\n n = n // 26\nanss = " "\nfor k in range(i):\n anss += ans[-1]\n del ans[-1]\nprint(anss)\n ', 'al = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nN = int(input())\nM = N\nv = 1\nwhile True:\n if(M<=26**v):\n break\n M -= 26**v\n v += 1\nfor i in range(v):\n N -= 26**i \nans = []\nfor i in range(v):\n ans.append("a")\nfor i in range(v):\n ans[-i-1]=al[N%26]\n N = N//26\nans.reverse()\nanss = ""\nfor i in range(len(ans)):\n anss += ans[-i-1]\nprint(anss)\n \n\n\n ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s253272884', 's584052191', 's373176619']
[9160.0, 9164.0, 9224.0]
[35.0, 27.0, 33.0]
[417, 309, 443]
p02629
u674343825
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\nans = []\nwhile n != 0:\n o = chr(n%26 +96)\n ans.append(o)\n n //= 26\nans = reversed(ans)\nprint(''.join(ans))n = int(input())\nans = []\nwhile n != 0:\n o = chr(n%26 +96)\n ans.append(o)\n n //= 26\nans = reversed(ans)\nprint(''.join(ans))", "n = int(input())\nans = []\nketa = n//26\nwhile n != 0:\n i = n%26\n if i == 0:\n o = 'z'\n n = n//26 -1\n else:\n o = chr(n%26 +96)\n n //= 26\n ans.append(o)\nans = reversed(ans)\nprint(''.join(ans))"]
['Runtime Error', 'Accepted']
['s332215829', 's089238854']
[9020.0, 8984.0]
[28.0, 31.0]
[264, 228]
p02629
u674588203
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N=int(input())\na1=['z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y']\na2=['','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\n\nname=[]\n\nif N==702:\n print('zz')\n exit()\nif N==18278:\n print('zzz')\n exit()\nif N==475254:\n print('zzzz')\n exit()\nif N==12345630:\n print('zzzzz')\n exit()\nif N==321272406:\n print('zzzzzz')\n exit()\nif N==8353082582:\n print('zzzzzz')\n exit()\n\n\nfor i in range (20):\n if N>26:\n _=N%26\n name.insert(0,a1[_])\n N=N//26\n if N==0:\n break\n else:\n pass\n elif 0<N<=26:\n _=N%26\n name.insert(0,a1[_])\n break\n else:\n break\nprint(name)\n\nprint(''.join(name))", "N=int(input())\na=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']\n\nname=[]\n\nfor i in range (20):\n N=N-1\n name.insert(0,a[N%26])\n N=N//26\n if N==0:\n break\n\nprint(''.join(name))"]
['Wrong Answer', 'Accepted']
['s899346558', 's120362875']
[9236.0, 9136.0]
[31.0, 28.0]
[806, 251]
p02629
u677121387
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nalpha = "zabcdefghijklmnopqrstuvwxy"\nans = ""\nwhile True:\n ans += alpha[n%26]\n n//=26\n if n < 26: break\nans += alpha[n]\nprint(ans[::-1]) ', 'n = int(input())\nl = 1\nwhile n-26**l > 0:\n n -= 26**l\n l += 1\nelse:\n n -= 1\n res = ""\n for i in range(l):\n n,r = divmod(n,26)\n res += chr(ord("a")+r)\n ans = res[::-1]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s587640046', 's778277553']
[9160.0, 9136.0]
[31.0, 33.0]
[163, 209]
p02629
u678167152
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["def solve():\n N = int(input())\n k = 1\n while N>pow(26,k):\n N -= pow(26,k)\n k += 1\n ans = ''\n N -= 1\n for i in range(k,1,-1):\n ans += chr(ord('a')+N//pow(26,i-1))\n N%=pow(26,i-1)\n ans += chr(ord('a')+N%pow(26,i))\n return ans\nprint(solve())", "def solve():\n N = int(input())\n k = 1\n while N>pow(26,k):\n N -= pow(26,k)\n k += 1\n ans = ''\n N -= 1\n for i in range(k,1,-1):\n ans += chr(ord('a')+N//pow(26,i-1))\n N%=pow(26,i-1)\n ans += chr(ord('a')+N%26)\n return ans\nprint(solve())"]
['Runtime Error', 'Accepted']
['s441574518', 's433879046']
[9156.0, 9192.0]
[28.0, 29.0]
[258, 251]
p02629
u679682246
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n=int(input())\nans=""\nwhile n>0:\n n-=1\n ans+=chr(ord(\'a\')+N%26)\n n//=26\n print(ans[::-1])', 'n=int(input())\nans=""\nwhile N>0:\n n-=1\n ans+=chr(ord(\'a\')+N%26)\n n//=26\n print(ans[::-1])', 'n=int(input())\nans=""\nwhile n>0:\n n-=1\n ans+=chr(ord(\'a\')+n%26)\n n//=26\nprint(ans[::-1])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s150961384', 's527766336', 's240477768']
[9172.0, 9100.0, 9172.0]
[22.0, 30.0, 29.0]
[101, 101, 97]
p02629
u684906944
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\n\nname = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\nans = ' '\n\nstop = False\n\nwhile not stop: \n if n // 26 >= 1:\n n = n // 26\n ans += name[(n-1) % 26]\n else:\n ans += name[n-1]\n stop = True\n\nprint(ans)", "n = int(input())\n\nname = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\nans = ' '\n\nstop = False\n\nwhile not stop: \n if n // 26 >= 1:\n ans += name[(n-1) % 26]\n n = n // 26\n else:\n ans += name[n-1]\n stop = True\n\nr_ans = ans[::-1]\n\nprint(r_ans)", "n = int(input())\n\nname = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\nans = ''\n\nstop = False\n\nwhile not stop: \n if (n-1) // 26 >= 1:\n ans += name[(n-1) % 26]\n n = (n-1) // 26\n else:\n ans += name[n-1]\n stop = True\n\nr_ans = ans[::-1]\n\nprint(r_ans)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s371597494', 's400773161', 's009837542']
[9200.0, 9188.0, 9212.0]
[28.0, 33.0, 29.0]
[317, 338, 345]
p02629
u685983477
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def main():\n n = int(input())\n alp = "zabcdefghijklmnopqrstuvwxy"\n res = ""\n for i in range(1,100):\n if(n<=26**i):\n for j in range(i):\n res+=chr(ord("a")+n%26)\n n//=26\n\n break\n else:\n n-=26**i\n print(res[::-1])\n\nif __name__ == \'__main__\':\n main()\n', 'def main():\n n = int(input())\n alp = "zabcdefghijklmnopqrstuvwxy"\n res = ""\n for i in range(1,100):\n if(n<=26**i):\n n-=1\n for j in range(i):\n res+=chr(ord("a")+n%26)\n n//=26\n\n break\n else:\n n-=26**i\n print(res[::-1])\n\nif __name__ == \'__main__\':\n main()\n']
['Wrong Answer', 'Accepted']
['s873418719', 's715098572']
[9124.0, 9192.0]
[28.0, 34.0]
[342, 359]
p02629
u686230543
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\n\npre_num = 0\ncur_num = 26\nlength = 1\nwhile n > cur_num:\n length += 1\n pre_num = cur_num\n cur_num += 26 ** length\n\nn -= pre_num\nname = []\na = ord('a')\nfor _ in range(length):\n c = n % 26\n n //= 26\n name.append(chr(a + c))\nprint(''.join(name[::-1]))", "n = int(input())\n\npre_num = 0\ncur_num = 26\nlength = 1\nwhile n > cur_num:\n length += 1\n pre_num = cur_num\n cur_num += 26 ** length\n\nn -= pre_num + 1\nname = []\na = ord('a')\nfor _ in range(length):\n c = n % 26\n n //= 26\n name.append(chr(a + c))\nprint(''.join(name[::-1]))"]
['Wrong Answer', 'Accepted']
['s344657775', 's020315334']
[9060.0, 9156.0]
[27.0, 27.0]
[270, 274]
p02629
u687416863
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N=int(input())\ni=N\nbase=26\nAns=''\nst='abcdefghijklmnopqrstuvwxyz'\n\nwhile i!=0:\n if i>base:\n wkm=i%base\n wk=wkm//(base//26)\n Ans=st[wk-1]+Ans\n if wkm!=0:\n i-=wkm\n else: \n i-=base\n base=base*26\n print(i)\n else: \n base=base//26\n wk=i//base\n Ans=st[wk-1]+Ans\n print(i)\n i=0\n \nprint(Ans)\n ", "N=int(input())\ni=N\nbase=26\nAns=''\nst='abcdefghijklmnopqrstuvwxyz'\n\nwhile i!=0:\n if i>base:\n wkm=i%base\n wk=wkm//(base//26)\n Ans=st[wk-1]+Ans\n if wkm!=0:\n i-=wkm\n else: \n i-=base\n base=base*26\n# print(i)\n else: \n base=base//26\n wk=i//base\n Ans=st[wk-1]+Ans\n# print(i)\n i=0\n \nprint(Ans)\n "]
['Wrong Answer', 'Accepted']
['s754270143', 's933364055']
[9200.0, 9176.0]
[30.0, 28.0]
[410, 412]
p02629
u690781906
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["n = int(input())\n\nx = 0\nfor i in range(1, 100):\n if n <= 26**i:\n x = i\n break\nans = ''\nfor i in range(x, 0, -1):\n y = n // (26**(i-1))\n print(y)\n ans += chr(y + 96)\n n -= (y * (26**(i-1)))\n\nprint(ans)\n", "n = int(input())\n\nalphabets = [chr(i) for i in range(ord('a'), ord('a') + 26)]\n\nans = ''\nwhile n > 0:\n n -= 1\n ans = alphabets[n % 26] + ans\n n = n // 26\n\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s925935747', 's832503815']
[9112.0, 9116.0]
[30.0, 26.0]
[230, 175]
p02629
u690833702
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['def main():\n N = int(input())\n ans = \'\'\n abc = "abcdefghijklmnopqrstuvwxyz"\n \n \n while N > 0:\n ans += abc[(N % 26)-1]\n print(ans)\n N = N//26\n \n print(ans[::-1])\n \n \n \nmain()', 'def main():\n N = int(input())\n ans = \'\'\n abc = "abcdefghijklmnopqrstuvwxyz"\n \n \n while N > 0:\n N -=1\n ans += abc[N % 26]\n \n N = N//26\n \n print(ans[::-1])\n \n \n \nmain()']
['Wrong Answer', 'Accepted']
['s789291695', 's772703220']
[9060.0, 8832.0]
[28.0, 33.0]
[193, 189]
p02629
u691399849
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\nans = ""\n\nwhile num > 0:\n\tN -= 1\n\tans += chr(ord(\'a\') + N % 26)\n\tN //= 26\n\nprint(ans)', '#include <bits/stdc++.h>\n\nusing namespace std;\n\nint main() {\n\tint a;\n\tcin>>a;\n\tstring res;\n\n\twhile (a != 0) {\n\t\tint rem=a%26;\n\t\ta/=26;\n\t\tchar asciiChar=rem+97-1;\n\t\tres+=asciiChar;\n\t}\n\n\treverse(res.begin(),res.end());\n\tcout<<res;\n}', '#include <bits/stdc++.h>\n\nusing namespace std;\n\n// ios::sync_with_stdio(0);\n// cin.tie(0);\n\n//freopen("input.txt", "r", stdin);\n//freopen("output.txt", "w", stdout);\n\nint main() {\n\tint a;\n\tcin>>a;\n\tstring res;\n\n\twhile (a != 0) {\n\t\tint rem=a%26;\n\t\ta/=26;\n\t\tchar asciiChar=rem+97-1;\n\t\tres+=asciiChar;\n\t}\n\n\treverse(res.begin(),res.end());\n\tcout<<res;\n}', 'num = int(input())\nres = ""\n\nwhile num != 0:\n\tnum -= 1\n\trem = num % 26\n\tres += chr(ord(\'a\') + int(rem))\n\tnum /= 26\n\nprint(res)', 'N = int(input())\nans = ""\n\nwhile N > 0:\n\tN -= 1\n\tans += chr(ord(\'a\') + N % 26)\n\tN //= 26\n\nprint(ans[::-1])']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s160197608', 's225031533', 's608977451', 's739123933', 's287877228']
[9100.0, 8904.0, 9016.0, 13728.0, 8960.0]
[25.0, 26.0, 23.0, 2206.0, 29.0]
[102, 230, 349, 126, 106]
p02629
u693580433
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = input()\nname = ""\n\nwhile(True):\n i = n % 26\n n = "abcdefghijklmnopqrstuvwxyz"[i]\n name = n + name\n \n n = (n-i) / 26\n if(n==0):\n break\n \nprint(name)', 'n = int(input())\nname = ""\n \nwhile(True):\n i = n % 26\n c = "zabcdefghijklmnopqrstuvwxyz"[i]\n name = c + name\n \n if(i==0):\n i=26\n n = int((n-i) / 26)\n if(n==0):\n break\n \nprint(name)']
['Runtime Error', 'Accepted']
['s703559490', 's534831042']
[9052.0, 9128.0]
[25.0, 27.0]
[163, 196]
p02629
u693716675
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['n = int(input())\nans = ""\nwhile(n>0):\n r = n%26\n if r==0:\n r = 26\n ans = s[r] + ans\n n -= r\n n //=26\nprint(ans)', 'n = int(input())\nans = ""\nwhile(n>0):\n r = n%26\n if r==0:\n r = 26\n ans = s[r] + ans\n n -= r\n n //=26', 's = "zabcdefghijklmnopqrstuvwxyz"\nn = int(input())\nans = ""\nwhile(n>0):\n r = n%26\n if r==0:\n r = 26\n ans = s[r] + ans\n n -= r\n n //=26\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s386340028', 's558977310', 's419983326']
[9168.0, 9160.0, 9168.0]
[27.0, 24.0, 26.0]
[133, 122, 168]
p02629
u694536861
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['x = int(input())\n\nalphbet = lambda c: chr(c+64)\n\ndef Base_10_to_n(X, n):\n X_dumy = X\n out = []\n while X_dumy>0:\n out.append(X_dumy%n)\n X_dumy = int(X_dumy/n)\n return out\nout = Base_10_to_n(x, 26).reverse()\nprint( "".join(alphbet(i) for i in out) )', 'x = int(input())\n\nalphbet = lambda c: chr(c+64)\n\ndef Base_10_to_n(X, n):\n X_dumy = X\n out = []\n while X_dumy > 0:\n if X_dumy % n == 0:\n out.append( 26 )\n X_dumy = int(X_dumy / n - 1)\n else:\n out.append( X_dumy % n )\n X_dumy = int(X_dumy / n)\n return out\nif 1 <= x <= 1000000000000001:\n out = Base_10_to_n(x, 26)[::-1]\n print( "".join(alphbet(i) for i in out).lower())\n']
['Runtime Error', 'Accepted']
['s591941487', 's539252733']
[9132.0, 9188.0]
[29.0, 33.0]
[273, 424]
p02629
u694665829
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['import math\nn=int(input())\ncc=[26,702,18278,475254,12356630,321272406,8353082582,217180147158,7842777632145,149009873285521]\ncca=["z","zz","zzz","zzzz","zzzzz","zzzzzz","zzzzzzz","zzzzzzzz","zzzzzzzzz","zzzzzzzzzz"]\nif n in cc:\n num=cc.index(n)\n print(cca[num])\nelse:\n al=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\n s=int(math.log10(n)/math.log10(26))\n L=[]\n for i in range(s,-1,-1):\n #print(i)\n L.append(n//26**i)\n n-=(n//26**i)*(26**i)\n #print(L)\n A=[]\n for i in range(len(L),0,-1):\n if L[i-1]==0:\n A.append("z")\n L[i-2]-=1\n else:\n A.append(al[L[i-1]-1])\n #print(A)\n for i in range(len(A),0,-1):\n print(A[i-1],end="")', 'import math\nn=int(input())\nal=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\ns=int(math.log10(n)/math.log10(26))\nL=[]\nfor i in range(s,-1,-1):\n #print(i)\n L.append(n//26**i)\n n-=(n//26**i)*(26**i)\nfor l in L:\n print(al[l-1],end="")', "N=int(input())\nans=''\nfor i in range(1,99):\n if N<=26**i:\n N-=1\n for j in range(i):\n ans+=chr(ord('a') + N%26)\n N//=26\n break\n else:\n N-=26**i\nprint(ans[::-1])"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s055559126', 's505521824', 's476333642']
[9292.0, 9256.0, 9160.0]
[31.0, 33.0, 27.0]
[790, 302, 215]
p02629
u698868214
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['N = int(input())\nnum = 0\nalpha = [chr(i) for i in range(97, 97+26)]\nwhile 26**num <= N:\n num += 1\nls = [[] for _ in range(num)]\nfor i in range(num):\n ls[i] = N//(26**(num-i-1))\n N %= 26**(num-i-1)\n print(alpha[ls[i]-1],end="")', 'N = int(input())\nchars = "Xabcdefghijklmnopqrstuvwxyz" \n\nn_rem = n \nres = ""\nwhile True:\n x = n_rem % 26\n if x == 0:\n x = 26\n res += chars[x]\n n_rem -= x\n \n if n_rem == 0:\n break\n n_rem //= 26\nprint(res[::-1])', 'N = int(input())\nchars = "Xabcdefghijklmnopqrstuvwxyz" \n\nn_rem = n \nres = ""\nwhile True:\n x = N % 26\n if x == 0:\n x = 26\n res += chars[x]\n n_rem -= x\n \n if n_rem == 0:\n break\n n_rem //= 26\nprint(res[::-1])', 'N = int(input())\nnum = 0\nalpha = [chr(i) for i in range(97, 97+26)]\nwhile 26**num < N:\n num += 1\nls = [[] for _ in range(num)]\nfor i in range(num):\n ls[i] = N//(26**(num-i-1))\n N %= 26**(num-i-1)\n print(alpha[ls[i]-1],end="")', 'n = int(input())\nchars = "Xabcdefghijklmnopqrstuvwxyz" \n\nn_rem = n \nres = ""\nwhile True:\n x = n_rem % 26\n if x == 0:\n x = 26\n res += chars[x]\n n_rem -= x\n \n if n_rem == 0:\n break\n n_rem //= 26\nprint(res[::-1])']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s317305870', 's557446053', 's786062968', 's886520779', 's029461236']
[9004.0, 9108.0, 9100.0, 9188.0, 9180.0]
[33.0, 28.0, 23.0, 32.0, 31.0]
[230, 421, 417, 229, 421]
p02629
u703528810
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["N = int(input())\nans = ''\nwhile N > 0:\nN -= 1\nans += chr(ord('a') + N % 26)\nN //= 26\nprint(ans[::-1])", 'N=int(input())\na=[chr(i) for i in range(97, 97+26)]\nfor i in range(1,100):\n if 26**i<N:\n N-=26**i\n continue\n ans=""\n N-=1\n for j in range(i):\n ans+=a[N%26]\n N//=26\n break\nprint(ans[::-1])']
['Runtime Error', 'Accepted']
['s129606695', 's218792910']
[8772.0, 8912.0]
[30.0, 30.0]
[101, 230]
p02629
u723345499
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
['arr = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nn = int(input())\n\ndef calc(sho, res):\n q, mod = divmod(sho, 26)\n res = arr[mod - 1] + res\n if(q >= 26):\n calc(q, res)\n else:\n res = arr[q - 1] + res\n print(res)\n return \n\ncalc(n, "")', 'arr = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]\nn = int(input())\n\ndef calc(sho, res):\n q, mod = divmod(sho, 26)\n res = arr[mod - 1] + res\n if (mod == 0):\n print(res)\n else:\n res = arr[q - 1] + res\n print(res)\n return\n \ncalc(n, "")', 'def calc(sho, res):\n q, mod = divmod(sho, 26)\n res = arr[mod - 1] + res\n if(q >= 26):\n calc(q, res)\n else:\n if (q == 0):\n print(res)\n elif(mod == 0):\n print(res)\n else:\n res = arr[q - 1] + res\n print(res)\n return \n\ncalc(n, "")', 'n = int(input())\n\ndef calc(m, res):\n q, mod = divmod(m, 26)\n if (mod == 0):\n q = q - 1\n mod = 26\n res = chr(ord("a") + (mod - 1)) + res\n else:\n res = chr(ord("a") + (mod - 1)) + res\n if (q > 0):\n calc(q, res)\n else:\n print(res)\n return\n \ncalc(n, "")']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s526626528', 's620848701', 's807751155', 's021210045']
[9148.0, 9176.0, 9060.0, 9132.0]
[30.0, 30.0, 24.0, 30.0]
[330, 333, 313, 360]
p02629
u725133562
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["import math\n\nn = int(input())\nketa = int(math.log(n)/math.log(26)) + 1\nname = [0]*keta\n\nfor i in range(keta):\n name[i] = n % 26\n n = n // 26\n\nalp = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nans = ''\n\nfor j in range(keta):\n if name[j] != 0:\n ans = alp[name[j]-1] + ans\n elif j != keta-1:\n name[j] = 26\n name[j+1] -= 1\n ans = alp[name[j]-1] + ans\n\nprint(name)\nprint(ans)\n", "import math\n\nn = int(input())\nketa = int(math.log(n)/math.log(26)) + 1\nname = [0]*keta\n\nfor i in range(keta):\n name[i] = n % 26\n n = n // 26\n\nalp = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']\n\nans = ''\n\nfor j in range(keta):\n if name[j] == 0 and j != keta-1:\n name[j] = 26\n name[j+1] -= 1\n ans = alp[name[j]-1] + ans\n elif name[j] == -1 and j != keta-1:\n name[j+1] -= 1\n name[j] += 26\n ans = alp[name[j]-1] + ans\n elif j == keta-1 and name[j] == 0:\n pass\n else:\n #name[j] != 0\n ans = alp[name[j]-1] + ans\n\n#print(name)\nprint(ans)\n"]
['Wrong Answer', 'Accepted']
['s893831771', 's022195395']
[9228.0, 9172.0]
[29.0, 36.0]
[499, 698]
p02629
u727057618
2,000
1,048,576
1000000000000001 dogs suddenly appeared under the roof of Roger's house, all of which he decided to keep. The dogs had been numbered 1 through 1000000000000001, but he gave them new names, as follows: * the dogs numbered 1,2,\cdots,26 were respectively given the names `a`, `b`, ..., `z`; * the dogs numbered 27,28,29,\cdots,701,702 were respectively given the names `aa`, `ab`, `ac`, ..., `zy`, `zz`; * the dogs numbered 703,704,705,\cdots,18277,18278 were respectively given the names `aaa`, `aab`, `aac`, ..., `zzy`, `zzz`; * the dogs numbered 18279,18280,18281,\cdots,475253,475254 were respectively given the names `aaaa`, `aaab`, `aaac`, ..., `zzzy`, `zzzz`; * the dogs numbered 475255,475256,\cdots were respectively given the names `aaaaa`, `aaaab`, ...; * and so on. To sum it up, the dogs numbered 1, 2, \cdots were respectively given the following names: `a`, `b`, ..., `z`, `aa`, `ab`, ..., `az`, `ba`, `bb`, ..., `bz`, ..., `za`, `zb`, ..., `zz`, `aaa`, `aab`, ..., `aaz`, `aba`, `abb`, ..., `abz`, ..., `zzz`, `aaaa`, ... Now, Roger asks you: "What is the name for the dog numbered N?"
["def main():\n n = int(input())\n res = ''\n d = 1\n base = []\n alp = 'abcdefghijklmnopqrstuvwxyz'\n for i in range(12):\n d *= 26\n base.append(d)\n for b in base:\n if b > n:\n break\n mod = n % b\n n = n - mod\n res = alp[mod-1] + res\n print(res)\n\n\n\n\nif __name__ == '__main__':\n main()\n\n", "def main():\n n = int(input())\n res = ''\n d = 1\n base = []\n alp = 'abcdefghijklmnopqrstuvwxyz'\n for b in range(12):\n mod = n % 26\n if mod == 0:\n mod = 26\n res = alp[mod-1] + res\n if n - mod == 0:\n break\n else:\n n = int((n - mod) / 26)\n \n print(res)\n\n\n\n\nif __name__ == '__main__':\n main()\n\n"]
['Runtime Error', 'Accepted']
['s792617820', 's838228865']
[9172.0, 9172.0]
[26.0, 32.0]
[356, 391]