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 | u153427406 | 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\nwhile n>=0:\n n=n-1 ##for tracking last character\n z+= chr( n%26 + ord('a') )\n n=n//26\nprint(z[::-1])\n ", 'n=int(input())\nz=""\nwhile n>0:\n n=n-1 ##for tracking last character\n z+= chr( n%26 + ord(\'a\') )\n n=n//26\nprint(z[::-1])\n'] | ['Runtime Error', 'Accepted'] | ['s986479982', 's561763339'] | [9152.0, 9132.0] | [28.0, 29.0] | [122, 123] |
p02629 | u159975271 | 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 = N\nB = ["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"]\nA = []\nli = [0]\nli2 = []\nfor i in range (14):\n li.append(26**(1+i))\na = 0\nfor j in range (14):\n a += li[j]\n li2.append(a)\nk = 0\nwhile(N > li2[k]):\n k+=1\n\nS -= (li2[k-1] +1)\namari = S % 26\nK = S\nfor l in range (k):\n A.append(B[(K//li[k - l])])\n print(li[k-l])\n\n K = K % li[k - l]\nA.append(B[amari])\nprint(\'\'.join(A[1:]))\n\n\n', 'N = int(input())\nS = N\nB = ["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"]\nA = []\nli = [0]\nli2 = []\nfor i in range (14):\n li.append(26**(1+i))\na = 0\nfor j in range (14):\n a += li[j]\n li2.append(a)\nk = 0\nwhile(N > li2[k]):\n k+=1\n\nS -= (li2[k-1] +1)\namari = S % 26\nK = S\nfor l in range (k):\n A.append(B[(K//li[k - l])])\n\n K = K % li[k - l]\nA.append(B[amari])\nprint(\'\'.join(A[1:]))\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s166956465', 's536162403'] | [9276.0, 9232.0] | [34.0, 29.0] | [476, 457] |
p02629 | u165133750 | 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 = \'abcdefghijklmnopqrstuvwxyz\'\nt = 0\nres = []\nwhile n > 26:\n res.append(n % 26)\n n = n // 26\nres.append(n)\nans = ""\nprint(res)\nfor i in range(1, len(res) + 1):\n ans += s[res[-i] - 1]\nprint("".join(ans))\n', 'n = int(input())\ns = \'abcdefghijklmnopqrstuvwxyz\'\nt = 0\nres = ""\nwhile n > 26:\n n -= 1\n res += s[n % 26]\n n //= 26\n\nres += s[n - 1]\nprint(res[::-1])'] | ['Wrong Answer', 'Accepted'] | ['s250557971', 's988999627'] | [9180.0, 9168.0] | [29.0, 28.0] | [231, 157] |
p02629 | u165318982 | 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 = int(input())\naz = 'zabcdefghijklmnopqrstuvwxy'\nans = ''\n\nwhile (A):\n A -= 1\n ans = az[A % 26] + ans\n A = A // 26\nprint(ans)", "A = int(input())\naz = 'zabcdefghijklmnopqrstuvwxy'\nans = ''\nabc = 'abcdefghijklmnopqrstuvwxyz'\n\nwhile (A):\n A -= 1\n ans = abc[A % 26] + ans\n A = A // 26\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s900610597', 's736809269'] | [9188.0, 9148.0] | [31.0, 29.0] | [130, 166] |
p02629 | u171803978 | 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 //= 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])"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s117332367', 's192910824', 's028797321'] | [8924.0, 8720.0, 8992.0] | [34.0, 24.0, 32.0] | [96, 107, 112] |
p02629 | u173148629 | 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\nans=[]\na=ord("a")\ntmp=0\nwhile N>0:\n tmp+=1\n if N%26==0:\n ans.append("z")\n else:\n if tmp==1:\n ans.append(chr(a+N%26-1))\n else:\n ans.append(chr(a+(N//(26**(tmp-1)))%26))\n N-=26**tmp\n print(N)\n\nprint("".join(ans[::-1]))', 'N=int(input())\n\nans=[]\na=ord("a")\nwhile N>0:\n N-=1\n chrr=N%26\n ans.append(chr(a+chrr))\n N//=26\n\n\nprint("".join(ans[::-1]))\n'] | ['Wrong Answer', 'Accepted'] | ['s296840363', 's634681494'] | [9100.0, 9096.0] | [29.0, 30.0] | [290, 135] |
p02629 | u178432859 | 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())\nmod = 26\nx = 1\nl = list()\nwhile True:\n if n <= mod:\n for i in range(x):\n l.append(n%26)\n n = n//26\n break\n else:\n n -= mod\n mod *= 26\n x += 1\nl.reverse()\n\nprint(l)\nl2 = list()\nif l.count(0) == x:\n print("z"*x)\n exit()\nfor i in range(len(l)):\n if i == x-1:\n if l[i] == 0:\n l2.append("z")\n else:\n l2.append(chr(l[i]+96))\n else:\n l2.append(chr(l[i]+97))\nprint("".join(l2))', 'n = int(input())\nmod = 26\nx = 1\nl = list()\nwhile True:\n if n <= mod:\n print(n)\n for i in range(x):\n l.append(n%26)\n n = n//26\n break\n else:\n n -= mod\n mod *= 26\n x += 1\nl.reverse()\n\nl2 = list()\nprint(l)\n# if l.count(0) == x:\n# print("z"*x)\n# exit()\n\n# if l[i] == 0:\n# l[i-1] -= 1\n# l[i] = 26\nif l.count(0) == x:\n print("z"*x)\n exit()\nfor i in range(x-1):\n l[i] += 1\nfor i in range(x-1,-1,-1):\n if l[i] == 0:\n l[i-1] -= 1\n l[i] = 25\nprint(l)\nfor i in range(len(l)):\n l2.append(chr(l[i]+96))\nprint("".join(l2))', 'n = int(input())\nmod = 26\nx = 1\nl = list()\nwhile True:\n if n <= mod:\n print(n)\n for i in range(x):\n l.append(n%26)\n n = n//26\n break\n else:\n n -= mod\n mod *= 26\n x += 1\nl.reverse()\n\nl2 = list()\nprint(l)\n# if l.count(0) == x:\n# print("z"*x)\n# exit()\n\n# if l[i] == 0:\n# l[i-1] -= 1\n# l[i] = 26\nif l.count(0) == x:\n print("z"*x)\n exit()\nfor i in range(x-1):\n l[i] += 1\nfor i in range(x-1,-1,-1):\n if l[i] == 0:\n l[i-1] -= 1\n l[i] = 26\nprint(l)\nfor i in range(len(l)):\n l2.append(chr(l[i]+96))\nprint("".join(l2))', 'n = int(input())\nmod = 26\nx = 1\nl = list()\nwhile True:\n if n <= mod:\n print(n)\n for i in range(x):\n l.append(n%26)\n n = n//26\n break\n else:\n n -= mod\n mod *= 26\n x += 1\nl.reverse()\n\nl2 = list()\n# if l.count(0) == x:\n# print("z"*x)\n# exit()\n\n# if l[i] == 0:\n# l[i-1] -= 1\n# l[i] = 26\nif l.count(0) == x:\n print("z"*x)\n exit()\nfor i in range(x-1):\n l[i] += 1\nfor i in range(x-1,-1,-1):\n if l[i] == 0:\n l[i-1] -= 1\n l[i] = 26\nfor i in range(len(l)):\n l2.append(chr(l[i]+96))\nprint("".join(l2))', 'n = int(input())\nmod = 26\nx = 1\nl = list()\nwhile True:\n if n <= mod:\n for i in range(x):\n l.append(n%26)\n n = n//26\n break\n else:\n n -= mod\n mod *= 26\n x += 1\nl.reverse()\n\nl2 = list()\n# if l.count(0) == x:\n# print("z"*x)\n# exit()\n\n# if l[i] == 0:\n# l[i-1] -= 1\n# l[i] = 26\nif l.count(0) == x:\n print("z"*x)\n exit()\nfor i in range(x-1):\n l[i] += 1\nfor i in range(x-1,-1,-1):\n if l[i] == 0:\n l[i-1] -= 1\n l[i] = 26\nfor i in range(len(l)):\n l2.append(chr(l[i]+96))\nprint("".join(l2))'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s187826128', 's218823062', 's250420792', 's609144149', 's978584270'] | [9228.0, 9248.0, 9176.0, 9244.0, 9224.0] | [30.0, 33.0, 31.0, 31.0, 27.0] | [504, 660, 660, 642, 625] |
p02629 | u183364338 | 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 k=0\nans=[]\nwhile k<1:\n if num<=26:\n ans.append((chr(96+num)))\n k=1\n elif num%26==0:\n num=(num//26-1)\n ans.append((chr(96+26)))\n else:\n ans.append((chr(96+num%26)))\n num=(num//26)\n\nfor i in range(len(ans)-1,-1,-1):\n if i ==0:\n print(ans[i])\n else:\n print(ans[i], end="")', 'num = int(input())\nk=0\nans=[]\nwhile k<1:\n if num<=26:\n ans.append((chr(96+num)))\n k=1\n elif num%26==0:\n num=(num//26-1)\n ans.append((chr(96+26)))\n else:\n ans.append((chr(96+num%26)))\n num=(num//26)\n\nfor i in range(len(ans)-1,-1,-1):\n if i ==0:\n print(ans[i])\n else:\n print(ans[i], end="")'] | ['Runtime Error', 'Accepted'] | ['s380042030', 's459377091'] | [9016.0, 9180.0] | [24.0, 31.0] | [342, 359] |
p02629 | u188138642 | 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 True:\n if N <= 26**i:\n N -= 1\n for j i in range(N):\n ans += chr(ord('a') + N%26)\n N //= 26\n break\n else:\n N -= 26 ** i\nprint(ans[::-1])", "N = int(input())\nans = ''\n\ni = 1\nwhile True:\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 i+=1\nprint(ans[::-1])"] | ['Runtime Error', 'Accepted'] | ['s105511919', 's733007019'] | [9032.0, 9184.0] | [27.0, 33.0] | [224, 237] |
p02629 | u188305619 | 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 True:\n rm = N % 26\n N //= 26\n if N == 0:\n break\n elif rm == 1:\n letter = "a"\n elif rm == 2:\n letter = "b"\n elif rm == 3:\n letter = "c"\n elif rm == 4:\n letter = "d"\n elif rm == 5:\n letter = "e"\n elif rm == 6:\n letter = "f"\n elif rm == 7:\n letter = "g"\n elif rm == 8:\n letter = "h"\n elif rm == 9:\n letter = "i"\n elif rm == 10:\n letter = "j"\n elif rm == 11:\n letter = "k"\n elif rm == 12:\n letter = "l"\n elif rm == 13:\n letter = "m"\n elif rm == 14:\n letter = "n"\n elif rm == 15:\n letter = "o"\n elif rm == 16:\n letter = "p"\n elif rm == 17:\n letter = "q"\n elif rm == 18:\n letter = "r"\n elif rm == 19:\n letter = "s"\n elif rm == 20:\n letter = "t"\n elif rm == 21:\n letter = "u"\n elif rm == 22:\n letter = "v"\n elif rm == 23:\n letter = "w"\n elif rm == 24:\n letter = "x"\n elif rm == 25:\n letter = "y"\n elif rm == 0:\n letter = "z"\n ans = f"{letter}{ans}"\nprint(ans)', 'N = int(input())\ndef alpha(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return alpha(num//26-1)+chr(90)\n else:\n return alpha(num//26)+chr(64+num%26)\nprint(alpha(N).lower())'] | ['Wrong Answer', 'Accepted'] | ['s529373741', 's390457695'] | [9276.0, 9056.0] | [35.0, 31.0] | [1163, 214] |
p02629 | u190167135 | 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 itertools import accumulate\nimport numpy as np\nN=int(input())\nL=[26**(i+1) for i in range(10)]\nsL=list(accumulate(L))\nresult=[]\nfor i in range(10):\n if N<=sL[i]:\n N-=sL[i-1]\n k=i\n break\nfor m in range(k):\n time=0\n while N>=L[k-m-1]:\n N-=L[k-m-1]\n time+=1\n result.append(chr(time+97).translate(correspond))\nresult.append(chr(N+96))\nprint(''.join(result))", "from itertools import accumulate\nimport numpy as np\nN=int(input())-1\nL=[26**(i+1) for i in range(10)]\nsL=list(accumulate(L))\nresult=[]\nfor i in range(10):\n if N<=sL[i] and N>=26:\n N-=sL[i-1]\n k=i\n break\nfor m in range(k):\n time=0\n while N>=L[k-m-1]:\n N-=L[k-m-1]\n time+=1\n result.append(chr(time+97))\nresult.append(chr(N+97))\nprint(''.join(result))", "from itertools import accumulate\nimport numpy as np\nN=int(input())\nL=[26**(i+1) for i in range(10)]\nsL=list(accumulate(L))\nresult=[]\nfor i in range(10):\n if N<=sL[i]:\n N-=sL[i-1]\n k=i\n break\nfor m in range(k):\n time=0\n while N>=L[k-m-1]:\n N-=L[k-m-1]\n time+=1\n result.append(chr(time+97).translate(correspond))\nresult.append(chr(N+96))\nprint(''.join(result))", "from itertools import accumulate\nimport numpy as np\nN=int(input())\nL=[26**(i+1) for i in range(10)]\nsL=list(accumulate(L))\nresult=[]\nfor i in range(10):\n if N<=sL[i]:\n N-=sL[i-1]\n k=i\n break\nfor m in range(k):\n time=0\n while N>=L[k-m-1]:\n N-=L[k-m-1]\n time+=1\n result.append(chr(time+97))\nresult.append(chr(N+96))\nprint(''.join(result))", "from itertools import accumulate\nimport numpy as np\nN=int(input())\nN-=1\nL=[26**(i+1) for i in range(15)]\nsL=list(accumulate(L))\nresult=[]\nk=0\nfor i in range(15):\n if N+1<=sL[i] and N>=25:\n N-=sL[i-1]\n k=i\n break\nfor m in range(k):\n time=0\n while N>=L[k-m-1]:\n N-=L[k-m-1]\n time+=1\n result.append(chr(time+97))\nresult.append(chr(N+97))\nprint(''.join(result))"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s064487211', 's139309451', 's555270070', 's735622414', 's979173631'] | [27228.0, 27028.0, 27164.0, 27056.0, 27180.0] | [115.0, 116.0, 118.0, 116.0, 118.0] | [405, 395, 405, 383, 404] |
p02629 | u192154323 | 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\nn = int(input())\nm = n\n\nalphabet = [chr(i) for i in range(97, 97+26)]\n\nketa = 1\nwhile True:\n if n <= 26**(keta):\n break\n n -= 26**(keta)\n keta += 1\nans = ''\n\nprint(keta)\nfor i in range(keta-1, -1, -1):\n have = min(m // (26 ** i),26)\n if not (have == 0 and len(ans)) > 0:\n ans += alphabet[have-1]\n m -= 26 ** i * have\n \nprint(ans)\n\n\n", "import sys\nn = int(input())\nm = n\n\nalphabet = [chr(i) for i in range(97, 97+26)]\n\nketa = 0\nwhile True:\n if n < 26**(keta):\n break\n keta += 1\nprint(keta)\nans = ''\n\nfor i in range(keta-1, -1, -1):\n have = m // (26 ** i)\n ans += alphabet[have-1]\n m -= 26 ** i * have\n \nprint(ans)\n\n\n", 'n = int(input())\nalphabet = [chr(i) for i in range(97, 97+26)]\nans = ""\ni = 0\n\nwhile n - 26**i >= 0:\n n -= 26**i\n i += 1\n\n\n\n\n\nfor _ in range(i):\n q,r = divmod(n,26)\n n = q\n ans += alphabet[r]\nprint(ans[::-1])'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s374232483', 's687851126', 's013942434'] | [9204.0, 9020.0, 9076.0] | [30.0, 34.0, 29.0] | [378, 304, 683] |
p02629 | u195177386 | 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\nimport string\nN = int(input())\nalphabet = list(string.ascii_lowercase)\nfor i in range(1,11+1):\n if 27**i >= N: break\nI = i\n\nans = ''\nn = N\nfor i in range(I, 0, -1):\n ans += alphabet[n//(26**i)-1]\n n -= (26**i)\nif n%26 > 0:\n ans += alphabet[n%26-1]\nprint(ans)", "import string\nN = int(input())\nalphabet = list(string.ascii_lowercase)\n\nn = N\nidxs = []\nwhile n > 0:\n n -= 1\n idxs.append(n%26)\n n //= 26\n\nans = ''\nfor i in idxs[::-1]:\n ans += alphabet[i]\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s358079292', 's989492512'] | [9992.0, 9980.0] | [35.0, 40.0] | [282, 211] |
p02629 | u208512038 | 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()\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 \nprint(num2alpha(n))', 'n = input()\n\ndef num2alpha(num):\n if num<=26:\n return chr(96+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(122)\n else:\n return num2alpha(num//26)+chr(96+num%26)\n\n\nprint(num2alpha(n))', 'n = int(input())\n\ndef num2alpha(num):\n if num <= 26:\n return chr(96 + num)\n elif num % 26 == 0:\n return num2alpha(num // 26 - 1) + chr(122)\n else:\n return num2alpha(num // 26) + chr(96 + num % 26)\n\nprint(num2alpha(n))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s535581658', 's551699235', 's539669092'] | [9004.0, 9132.0, 9176.0] | [28.0, 26.0, 36.0] | [223, 221, 247] |
p02629 | u208882647 | 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?" | ['s="abcdefghijklmnopqrstuvwxyz"\n\tm=""\n\twhile n:\t\t\n\t\t# print(r)\n\t\tif(n%26==0):\n\t\t\tm+=\'z\'\n\t\telse:\n\t\t\tm+=s[(n%26)-1]\n\t\tn=(n//26)\n\t# reverse\n\tm=m[::-1]\n\tprint(m)\n', 's="abcdefghijklmnopqrstuvwxyz"\nm=""\nwhile n:\t\t\n # print(r)\n if(n%26==0):\n m+=\'z\'\n else:\n m+=s[(n%26)-1]\n n=(n//26)\n # reverse\n m=m[::-1]\n print(m)\n', 'N = int(input())\nans = []\nwhile N:\n N -= 1\n N, r = divmod(N, 26)\n ans.append(chr(ord(\'a\') + r))\nprint("".join(reversed(ans)))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s505978172', 's531725316', 's129941869'] | [9008.0, 8924.0, 9164.0] | [27.0, 26.0, 29.0] | [157, 180, 134] |
p02629 | u209275335 | 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())\nc = 0\nn1 = 0\nn1 += n\nfor i in range(1,12):\n a = n1 - 26**(i)\n c += 1\n if a <= 0:\n break\n n1 = n1 - 26**(i)\nprint(c)\na = ""\nfor i in range(c):\n if n // 26**(c-i-1) >= 26:\n alpha = 26\n n = n - 26**(c-i)\n else:\n alpha = n // 26**(c-i-1)\n n = n % 26**(c-i)\n a += chr(96 + alpha)\nprint(a)', 'n = int(input())\nalpha = "abcdefghijklmnopqrstuvwxyz"\nanswer = ""\nwhile n > 0:\n n -= 1\n answer += alpha[n%26]\n n//=26\nprint(answer[::-1])'] | ['Wrong Answer', 'Accepted'] | ['s256290070', 's636319253'] | [9192.0, 9100.0] | [31.0, 30.0] | [356, 146] |
p02629 | u211706121 | 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())-1\n\nans=''\nlast=0\n\nketa=1\n\nwhile True:\n if last+26**keta>n:\n for i in range(keta):\n idx=n%26\n n//=26\n ans+=chr(97+idx)\n break\n n-=26**keta\n keta+=1\nprint(reversed(ans))", "n=int(input())-1\n\nans=''\nlast=0\n\nketa=1\n\nwhile True:\n if last+26**keta>n:\n for i in range(keta):\n idx=n%26\n n//=26\n ans+=chr(97+idx)\n break\n n-=26**keta\n keta+=1\nprint(ans[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s992565035', 's450670336'] | [9188.0, 9208.0] | [34.0, 33.0] | [238, 234] |
p02629 | u212328220 | 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())\nmoji = [chr(i) for i in range(97, 97+26)]\n\nlst = [0]\nn = 0\nfor i in range(1,13):\n n = n + 26 ** i\n lst.append(n)\n\n\nketa = 0\nfor i in range(len(lst)):\n if N <= lst[i]:\n keta = i\n break\n\nnum = []\nketax = keta\nfor _ in range(keta):\n syo = N // (26 ** (ketax - 1))\n amari = N % (26 ** (ketax - 1))\n print(syo)\n if syo == 27:\n syo = 26\n if amari == 0:\n amari = 26 ** (ketax - 1)\n num.append(syo)\n N = amari\n ketax -= 1\n\n\nans = ''\nfor i in range(len(num)):\n ans += moji[num[i]-1]\nprint(ans)\n", "N = int(input())\nmoji = [chr(i) for i in range(97, 97+26)]\n\nlst = [0]\nn = 0\nfor i in range(1,13):\n n = n + 26 ** i\n lst.append(n)\n\n\nketa = 0\nfor i in range(len(lst)):\n if N <= lst[i]:\n keta = i\n break\n\nnum = []\nketax = keta\nfor _ in range(keta):\n syo = N // (26 ** (ketax - 1))\n amari = N % (26 ** (ketax - 1))\n print(syo)\n if syo == 27:\n syo = 26\n if amari == 0:\n amari = 26 ** (ketax - 1)\n num.append(syo)\n N = amari\n ketax -= 1\nprint(num)\n\nans = ''\nfor i in range(len(num)):\n ans += moji[num[i]-1]\nprint(ans)\n", "n = int(input())\n\nmoji = [chr(i) for i in range(97, 97+26)]\nans = ''\nwhile n > 0:\n n -= 1\n x = int(n % 26)\n ans = moji[n % 26] + ans\n n //= 26\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s119142272', 's456580077', 's889456006'] | [9156.0, 9148.0, 9180.0] | [27.0, 31.0, 29.0] | [590, 600, 165] |
p02629 | u215286521 | 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 math import floor,ceil,sqrt,factorial,log\nfrom collections import Counter, deque\nfrom functools import reduce\nimport numpy as np\nimport itertools\ndef S(): return input()\ndef I(): return int(input())\ndef MS(): return map(str,input().split())\ndef MI(): return map(int,input().split())\ndef FLI(): return [int(i) for i in input().split()]\ndef LS(): return list(MS())\ndef LI(): return list(MI())\ndef LLS(): return [list(map(str, l.split() )) for l in input()]\ndef LLI(): return [list(map(int, l.split() )) for l in input()]\ndef LLSN(n: int): return [LS() for _ in range(n)]\ndef LLIN(n: int): return [LI() for _ in range(n)]\n\nN = I()\n\nans = ""\nfor i in range(1,100):\n n = 26**i\n if N > n:\n N -= 26**i\n continue\n\n N = N - 1\n for j in range(i):\n x,y = divmod(N, 26)\n ans += chr(ord(\'a\') + y)\n N = N //26\n break\n \nprint(reversed(ans))', 'from math import floor,ceil,sqrt,factorial,log\nfrom collections import Counter, deque\nfrom functools import reduce\nimport numpy as np\nimport itertools\ndef S(): return input()\ndef I(): return int(input())\ndef MS(): return map(str,input().split())\ndef MI(): return map(int,input().split())\ndef FLI(): return [int(i) for i in input().split()]\ndef LS(): return list(MS())\ndef LI(): return list(MI())\ndef LLS(): return [list(map(str, l.split() )) for l in input()]\ndef LLI(): return [list(map(int, l.split() )) for l in input()]\ndef LLSN(n: int): return [LS() for _ in range(n)]\ndef LLIN(n: int): return [LI() for _ in range(n)]\n\nN = I()\n\nans = ""\nfor i in range(1,100):\n n = 26**i\n if N > n:\n N -= 26**i\n continue\n\n N = N - 1\n for j in range(i):\n x,y = divmod(N, 26)\n ans += chr(ord(\'a\') + y)\n N = N //26\n break\n \nprint(ans[::-1])'] | ['Wrong Answer', 'Accepted'] | ['s998931824', 's959033498'] | [26428.0, 27028.0] | [118.0, 120.0] | [883, 879] |
p02629 | u217571418 | 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 = 'abcdefghijklmnopqrstuvwxyz'\nans = ''\n\nwhile N > 0:\n\tans = alpha[N%26] + ans\n\tN = N//26\n\nprint(ans)", "N = int(input())\nalpha = 'abcdefghijklmnopqrstuvwxyz'\nans = ''\n\nwhile N > 0:\n N = N - 1\n ans = alpha[N%26] + ans\n N = N//26\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s500399277', 's899661596'] | [9112.0, 9084.0] | [32.0, 30.0] | [124, 138] |
p02629 | u221061152 | 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())\nfrom math import log, floor\n \ndef ten_to_n(X,n):\n if X//n:\n ans = ten_to_n(X//n,n)\n ans.append(X%n)\n return ans\n else:\n return [X%n]\n \ndic = {}\nl = ten_to_n(n,26)\nprint(l)\n\n# if l[i]\n#l[-1]+=1\nfor i in range(len(l)-1,0,-1):\n if l[i] > 25:\n t = l[i]\n l[i-1] += t//26\n l[i] = t%26\nfor i in range(len(l)-1,0,-1):\n if l[i] <= 0:\n l[i]+=26\n l[i-1]-=1\nif l[0] == 0:\n l = l[1:]\n#print(l)\n \nfor v1,v2 in zip(range(1,27),'abcdefghijklmnopqrstuvwxyz'):\n dic[v1]=v2\nans = ''.join([dic[v] for v in l])\nprint(ans) \n\n", "n=int(input())\nfrom math import log, floor\ndic = {} \nfor v1,v2 in zip(range(26),'abcdefghijklmnopqrstuvwxyz'):\n dic[v1]=v2\nans = ''\nfor i in range(1,99):\n if n <= 26**i:\n n-=1\n for j in range(i):\n ans += dic[n%26]\n n //= 26\n break\n else:\n n -= 26**i\n\nprint(ans[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s511237518', 's165581429'] | [8908.0, 9204.0] | [29.0, 27.0] | [589, 295] |
p02629 | u222293734 | 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?" | ['p = [pow(26, i) for i in range(17)]\nnum = [0 for i in range(17)]\nchars = ["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(17):\n if i == 0:\n continue\n if i == 1:\n num[i] = 26\n else:\n num[i] = num[i-1] + p[i]\nn = int(input())\nans = \'\'\nl = 0\nwhile n > nums[l]:\n l += 1\nx = n - nums[l-1] - 1\nfor _ in range(l):\n c = chr(ord("a") + x % 26)\n ans = c + ans\n x //= 26\nprint(ans)\n', 'p = [pow(26, i) for i in range(17)]\nnum = [0 for i in range(17)]\nchars = ["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(17):\n if i == 0:\n continue\n if i == 1:\n num[i] = 26\n else:\n num[i] = num[i-1] + p[i]\nn = int(input())\nans = \'\'\nwhile n > 0:\n i = 16\n while n < num[i]:\n i -= 1\n if n == num[i]:\n ans += "z"\n n -= p[i]\n else:\n q = n // num[i]\n ans += chars[q - 1]\n n -= q * num[i]\nprint(ans)', 'p = [pow(26, i) for i in range(17)]\nnum = [0 for i in range(17)]\nfor i in range(17):\n if i == 0:\n continue\n if i == 1:\n num[i] = 26\n else:\n num[i] = num[i-1] + p[i]\nn = int(input())\nans = \'\'\nl = 0\nwhile n > num[l]:\n l += 1\nx = n - num[l-1] - 1\nfor _ in range(l):\n c = chr(ord("a") + x % 26)\n ans = c + ans\n x //= 26\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s411278278', 's774006747', 's242476946'] | [9140.0, 9160.0, 9164.0] | [25.0, 32.0, 26.0] | [484, 524, 342] |
p02629 | u224119985 | 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 num2(num):\n if num<=26:\n return chr(num+64)\n elif num%26==0:\n return num2(num//26-1)+chr(90)\n else:\n return num2(num//26)+chr(64+num%26)\nprint(num2(n))', 'n=int(input())\ndef num2(num):\n if num<=26:\n return chr(num+96)\n elif num%26==0:\n return num2(num//26-1)+chr(122)\n else:\n return num2(num//26)+chr(96+num%26)\nprint(num2(n))'] | ['Wrong Answer', 'Accepted'] | ['s375364940', 's541202102'] | [9144.0, 9160.0] | [32.0, 33.0] | [200, 201] |
p02629 | u224405189 | 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?" | ['i = input()\nans = ""\n\nwhile i = 0:\n\tnexti = i // 26\n\tmod = i % 26\n if mod = 0:\n\t\tnextans = "z" + ans\n\t\tnextii = nexti - 1\n nexti = nextii\n elif mod = 1:\n\t\tnextans = "a" + ans\n elif mod = 2:\n\t\tnextans = "b" + ans\n elif mod = 3:\n\t\tnextans = "c" + ans\n elif mod = 4:\n\t\tnextans = "d" + ans\n elif mod = 5:\n\t\tnextans = "e" + ans\n elif mod = 6:\n\t\tnextans = "f" + ans\n elif mod = 7:\n\t\tnextans = "g" + ans\n elif mod = 8:\n\t\tnextans = "h" + ans\n elif mod = 9:\n\t\tnextans = "i" + ans\n elif mod = 10:\n\t\tnextans = "j" + ans\n elif mod = 11:\n\t\tnextans = "k" + ans\n elif mod = 12:\n\t\tnextans = "l" + ans\n elif mod = 13:\n\t\tnextans = "m" + ans\n elif mod = 14:\n\t\tnextans = "n" + ans\n elif mod = 15:\n\t\tnextans = "o" + ans\n elif mod = 16:\n\t\tnextans = "p" + ans\n elif mod = 17:\n\t\tnextans = "q" + ans\n elif mod = 18:\n\t\tnextans = "r" + ans\n elif mod = 19:\n\t\tnextans = "s" + ans\n elif mod = 20:\n\t\tnextans = "t" + ans\n elif mod = 21:\n\t\tnextans = "u" + ans\n elif mod = 22:\n\t\tnextans = "v" + ans\n elif mod = 23:\n\t\tnextans = "w" + ans\n elif mod = 24:\n\t\tnextans = "x" + ans\n elif mod = 25:\n\t\tnextans = "y" + ans\n\tans = nextans\n\ti = nexti\nprint(ans)', 'i = int(input())\nnexti = 0\nnextii = 0\nans = str()\nnextans = str()\n\n\nwhile i == 0:\n nexti = i // 26\n mod = i % 26\n if mod == 0:\n nextans = "z" + ans\n nextii = nexti-1\n nexti = nextii\n elif mod == 1:\n nextans = "a" + ans\n elif mod == 2:\n nextans = "b" + ans\n elif mod == 3:\n nextans = "c" + ans\n elif mod == 4:\n nextans = "d" + ans\n elif mod == 5:\n nextans = "e" + ans\n elif mod == 6:\n nextans = "f" + ans\n elif mod == 7:\n nextans = "g" + ans\n elif mod == 8:\n nextans = "h" + ans\n elif mod == 9:\n nextans = "i" + ans\n elif mod == 10:\n nextans = "j" + ans\n elif mod == 11:\n nextans = "k" + ans\n elif mod == 12:\n nextans = "l" + ans\n elif mod == 13:\n nextans = "m" + ans\n elif mod == 14:\n nextans = "n" + ans\n elif mod == 15:\n nextans = "o" + ans\n elif mod == 16:\n nextans = "p" + ans\n elif mod == 17:\n nextans = "q" + ans\n elif mod == 18:\n nextans = "r" + ans\n elif mod == 19:\n nextans = "s" + ans\n elif mod == 20:\n nextans = "t" + ans\n elif mod == 21:\n nextans = "u" + ans\n elif mod == 22:\n nextans = "v" + ans\n elif mod == 23:\n nextans = "w" + ans\n elif mod == 24:\n nextans = "x" + ans\n elif mod == 25:\n nextans = "y" + ans\n ans = nextans\n i = nexti\n\nelse:\n print(ans)', 'i = int(input())\nnexti = 0\nnextii = 0\nans = ""\nnextans = ""\n\nwhile i == 0:\n nexti = i // 26\n mod = i % 26\n if mod == 0:\n nextans = "z" + ans\n nextii = nexti-1\n nexti = nextii\n elif mod == 1:\n nextans = "a" + ans\n elif mod == 2:\n nextans = "b" + ans\n elif mod == 3:\n nextans = "c" + ans\n elif mod == 4:\n nextans = "d" + ans\n elif mod == 5:\n nextans = "e" + ans\n elif mod == 6:\n nextans = "f" + ans\n elif mod == 7:\n nextans = "g" + ans\n elif mod == 8:\n nextans = "h" + ans\n elif mod == 9:\n nextans = "i" + ans\n elif mod == 10:\n nextans = "j" + ans\n elif mod == 11:\n nextans = "k" + ans\n elif mod == 12:\n nextans = "l" + ans\n elif mod == 13:\n nextans = "m" + ans\n elif mod == 14:\n nextans = "n" + ans\n elif mod == 15:\n nextans = "o" + ans\n elif mod == 16:\n nextans = "p" + ans\n elif mod == 17:\n nextans = "q" + ans\n elif mod == 18:\n nextans = "r" + ans\n elif mod == 19:\n nextans = "s" + ans\n elif mod == 20:\n nextans = "t" + ans\n elif mod == 21:\n nextans = "u" + ans\n elif mod == 22:\n nextans = "v" + ans\n elif mod == 23:\n nextans = "w" + ans\n elif mod == 24:\n nextans = "x" + ans\n elif mod == 25:\n nextans = "y" + ans\n ans = nextans\n i = nexti\nprint(ans)', 'i = int(input())\nnexti = 0\nnextii = 0\nans = str()\nnextans = str()\n\n\nwhile i > 0:\n nexti = i // 26\n mod = i % 26\n if mod == 0:\n nextans = "z" + ans\n nextii = nexti-1\n nexti = nextii\n elif mod == 1:\n nextans = "a" + ans\n elif mod == 2:\n nextans = "b" + ans\n elif mod == 3:\n nextans = "c" + ans\n elif mod == 4:\n nextans = "d" + ans\n elif mod == 5:\n nextans = "e" + ans\n elif mod == 6:\n nextans = "f" + ans\n elif mod == 7:\n nextans = "g" + ans\n elif mod == 8:\n nextans = "h" + ans\n elif mod == 9:\n nextans = "i" + ans\n elif mod == 10:\n nextans = "j" + ans\n elif mod == 11:\n nextans = "k" + ans\n elif mod == 12:\n nextans = "l" + ans\n elif mod == 13:\n nextans = "m" + ans\n elif mod == 14:\n nextans = "n" + ans\n elif mod == 15:\n nextans = "o" + ans\n elif mod == 16:\n nextans = "p" + ans\n elif mod == 17:\n nextans = "q" + ans\n elif mod == 18:\n nextans = "r" + ans\n elif mod == 19:\n nextans = "s" + ans\n elif mod == 20:\n nextans = "t" + ans\n elif mod == 21:\n nextans = "u" + ans\n elif mod == 22:\n nextans = "v" + ans\n elif mod == 23:\n nextans = "w" + ans\n elif mod == 24:\n nextans = "x" + ans\n elif mod == 25:\n nextans = "y" + ans\n ans = nextans\n i = nexti\nprint(ans)\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s273671366', 's959393516', 's998831480', 's934058393'] | [8812.0, 9304.0, 9320.0, 9320.0] | [32.0, 32.0, 26.0, 26.0] | [1200, 1282, 1266, 1273] |
p02629 | u225247096 | 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 nod(n) :\n i = 1\n while n > 26 ** i :\n n = n - 26 ** i\n i += 1\n return i\n\nn = int(input())\ni = nod(n)\ndemo = [26 ** j for j in range(12)]\ndemo1 = []\nk = 0\nfor j in demo :\n k += j\n demo1.append(k)\nn = n - demo1[i - 1] + 1\ni -= 1\nans = []\nwhile i >= 0 :\n k = n // (26 ** i)\n if (26 ** i) * k >= n and n != 26:\n k -= 1\n n -= (26 ** i) * k\n if i > 0 :\n ans.append(chr(96 + k + 1))\n else :\n ans.append(chr(96 + k))\n i -= 1\nprint(''.join(map(str,ans)))\n", "def nod(n) :\n i = 1\n while n > 26 ** i :\n n = n - 26 ** i\n i += 1\n return i\n\nn = int(input())\ni = nod(n)\ndemo = [26 ** j for j in range(12)]\ndemo1 = []\nk = 0\nfor j in demo :\n k += j\n demo1.append(k)\nn = n - demo1[i - 1] + 1\nprint(n)\ni -= 1\nans = []\nwhile i >= 0 :\n k = n // (26 ** i)\n if (26 ** i) * k >= n and n != 26:\n k -= 1\n n -= (26 ** i) * k\n print(n,k)\n if i > 0 :\n ans.append(chr(96 + k + 1))\n else :\n ans.append(chr(96 + k))\n i -= 1\nprint(''.join(map(str,ans)))\n", "def nod(n) :\n i = 1\n while n > 26 ** i :\n n = n - 26 ** i\n i += 1\n return i\n \nn = int(input())\ni = nod(n)\n##print(i)\ndemo = [26 ** j for j in range(12)]\ndemo1 = []\nk = 0\nfor j in demo :\n k += j\n demo1.append(k)\n##print(demo)\n##print(demo1)\nn = n - demo1[i - 1] + 1\n##print(n)\n##print(n / 26)\nif n / 26 != n // 26 :\n i -= 1\n ans = []\n while i >= 0 :\n k = n // (26 ** i)\n n -= (26 ** i) * k\n if i > 0 :\n ans.append(chr(96 + k + 1))\n else :\n ans.append(chr(96 + k))\n i -= 1\n print(''.join(map(str,ans)))\nelse :\n i -= 1\n ans = []\n while i >= 0 :\n k = n // (26 ** i)\n n -= (26 ** i)*k\n if n > 0 :\n if i > 1 :\n \n ans.append(chr(96+k+1))\n elif i == 1 :\n \n ans.append(chr(96 + k))\n else :\n ans.append('z')\n else :\n ans.append(chr(96 + k))\n \n while i > 0 :\n ans.append('z')\n i -= 1\n break\n i -= 1\n print(''.join(map(str,ans)))\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s692972418', 's843129124', 's008995568'] | [9132.0, 9120.0, 9184.0] | [29.0, 29.0, 29.0] | [518, 542, 1211] |
p02629 | u225388820 | 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 = [chr(ord(\'a\') + i) for i in range(26)]\nn = int(input())\ns = ""\nwhile n:\n s += al[a % 26 - 1]\n n = (n - 1) // 26\nprint(s[::-1])', 'al = [chr(ord(\'a\') + i) for i in range(26)]\nn = int(input())\ns = ""\nwhile n:\n s += al[n % 26 - 1]\n n = (n - 1) // 26\nprint(s[::-1])'] | ['Runtime Error', 'Accepted'] | ['s050602615', 's230142246'] | [9184.0, 9172.0] | [29.0, 31.0] | [137, 137] |
p02629 | u229429359 | 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 = [chr(i) for i in range(97, 97+26)]\n\nn = 1\ns = 26\nfor i in range(1,12):\n if N <= s:\n n = i\n break\n else:\n s += 26**(i+1)\n \ns = 0\nfor i in range(1,n):\n s += 26**i\n \nN = N - s - 1\nif N == 0:\n Ans = ""\n for _ in range(n):\n Ans += "a"\nelse:\n while N > 0:\n L.append(N%26)\n N = N//26\n \n Ans = ""\n for x in reversed(L):\n Ans += alphabet[x]\nprint(Ans)', 'N = int(input())\nalphabet = [chr(i) for i in range(97, 97+26)]\n\nn = 1\ns = 26\nfor i in range(1,12):\n if N <= s:\n n = i\n break\n else:\n s += 26**(i+1)\n \ns = 0\nfor i in range(1,n):\n s += 26**i\n \nN = N - s - 1\nif N == 0:\n Ans = ""\n for _ in range(n):\n Ans += "a"\nelse:\n L = [0 for _ in range(n)]\n i = 1\n while N > 0:\n L[-i] = N%26\n N = N//26\n i +=1\n \n Ans = ""\n for x in L:\n Ans += alphabet[x]\nprint(Ans)'] | ['Runtime Error', 'Accepted'] | ['s864199267', 's717365470'] | [9232.0, 9252.0] | [26.0, 28.0] | [456, 498] |
p02629 | u232652798 | 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?" | ["strings = sorted(a)\nN = int(input())\n\n\nset_index = ''\nwhile N > 0:\n N -= 1\n index = (N % 26) + ord('a')\n set_index += chr(index)\n N //= 26\nprint(set_index[::-1])", "N = int(input())\n\ntxt = ''\nwhile N > 0:\n N -= 1\n\n ama = N % 26\n digit = chr(ord('a') + ama)\n txt += digit\n N = N//26\n\nprint(txt[::-1])\n"] | ['Runtime Error', 'Accepted'] | ['s856123381', 's156244304'] | [9036.0, 9036.0] | [27.0, 30.0] | [173, 150] |
p02629 | u232903302 | 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()\nN = list(map(int,[i for i in N]))\nlst = base_convert(N,10,26)\nlst_converted = convertList(lst)\nprint(''.join([dict1[i] for i in lst_converted]))", "def base_convert(nl, ibase, obase):\n o = []\n while any(nl):\n c = 0\n for i in range(len(nl)):\n c = c * ibase + nl[i]\n nl[i],c = divmod(c,obase)\n o.append(c)\n o.reverse()\n return o\n\ndef convertList(lst):\n rev_lst = list(reversed(lst))\n for i,num in enumerate(rev_lst):\n if i < len(rev_lst)-1:\n if num <= 0:\n rev_lst[i+1] = rev_lst[i+1]-1\n rev_lst[i] = rev_lst[i] + 26\n return list(reversed(rev_lst))\n\nN = input()\nN = list(map(int,[i for i in N]))\nlst = base_convert(N,10,26)\nlst_converted = convertList(lst)\nans = ''.join([dict1[i] for i in lst_converted])\nprint(ans)", "N = input()\nN = list(map(int,[i for i in N]))\nlst = base_convert(N,10,26)\nlst_converted = convertList(lst)\nprint(''.join([dict1[i] for i in lst_converted]))", "N = input()\nN = list(map(int,[i for i in N]))\nlst = base_convert(N,10,26)\nlst_converted = convertList(lst)\nprint(''.join([dict1[i] for i in lst]))", "def base_convert(nl, ibase, obase):\n o = []\n while any(nl):\n c = 0\n for i in range(len(nl)):\n c = c * ibase + nl[i]\n nl[i],c = divmod(c,obase)\n o.append(c)\n o.reverse()\n return o\n\ndef convertList(lst):\n rev_lst = list(reversed(lst))\n for i,num in enumerate(rev_lst):\n if i < len(rev_lst)-1:\n if num <= 0:\n rev_lst[i+1] = rev_lst[i+1]-1\n rev_lst[i] = rev_lst[i] + 26\n return list(reversed(rev_lst))\n\ndict1 = {\n 0: '',\n 1: 'a',\n 2: 'b',\n 3: 'c',\n 4: 'd',\n 5: 'e',\n 6: 'f',\n 7: 'g',\n 8: 'h',\n 9: 'i',\n 10: 'j',\n 11: 'k',\n 12: 'l',\n 13: 'm',\n 14: 'n',\n 15: 'o',\n 16: 'p',\n 17: 'q',\n 18: 'r',\n 19: 's',\n 20: 't',\n 21: 'u',\n 22: 'v',\n 23: 'w',\n 24: 'x',\n 25: 'y',\n 26: 'z'\n}\n\nN = input()\nN = list(map(int,[i for i in N]))\nlst = base_convert(N,10,26)\nlst_converted = convertList(lst)\nans = ''.join([dict1[i] for i in lst_converted])\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s506148274', 's543602336', 's621444714', 's937675095', 's197628603'] | [9176.0, 9252.0, 9172.0, 9124.0, 9292.0] | [26.0, 28.0, 25.0, 25.0, 30.0] | [156, 677, 156, 146, 1029] |
p02629 | u233107306 | 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\n ans = ""\n while n > 0:\n n -= 1\n i = n % 26\n print(i)\n ans += chr(ord(\'a\') + i)\n n = n // 26\n print(n)\n ans = ans[::-1]\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n\n ans = ""\n while n > 0:\n n -= 1\n i = n % 26\n print(i)\n ans += chr(ord(\'a\') + i)\n n = n // 26\n print(n)\n ans = ans[::-1]\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main():\n n = int(input())\n\n ans = ""\n while n > 0:\n n -= 1\n i = n % 26\n ans += chr(ord(\'a\') + i)\n n = n // 26\n ans = ans[::-1]\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s223850666', 's931186872', 's098680695'] | [9180.0, 9172.0, 9168.0] | [27.0, 32.0, 32.0] | [260, 260, 226] |
p02629 | u234454594 | 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 x=n%26\n print(n)\n print(chr(x+96))\n if x!=0:\n ans+=chr(x+96)\n else:\n ans+='z'\n n-=1\n n=n//26\nprint(ans[::-1])", "n=int(input())\nans=''\nwhile n>0:\n x=n%26\n if x!=0:\n ans+=chr(x+96)\n else:\n ans+='z'\n n-=1\n n=n//26\nprint(ans[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s448055093', 's305568305'] | [9180.0, 9080.0] | [31.0, 33.0] | [182, 148] |
p02629 | u235783479 | 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\nfrom decimal import Decimal\n\nN = int(input())\n\nres = ""\n\nalp = "0abcdefghijklmnopqrstuvwxyz"\n\nwhile N > 0:\n if N > 26:\n \n NN = N//26\n m = N - NN*26\n N = N//26\n # print(alp[m])\n res = alp[m] + res\n else:\n # print(alp[N])\n res = alp[m] + res\n N = 0\n\nprint(res)', 'import math\nfrom decimal import Decimal\n\nN = int(input())\n\nres = ""\n\nalp = "0abcdefghijklmnopqrstuvwxyz"\n\nwhile N > 0:\n # print(N)\n if N > 26:\n \n NN = N//26\n # print("NN: ", NN)\n # print(N - NN*26)\n m = N - NN*26\n N = N//26\n # print("m is ", m)\n if m==0:\n m=26\n N = N-1\n # print(alp[m], "!")\n res = alp[m] + res\n else:\n # print(alp[N])\n # print(alp[N], "!")\n res = alp[N] + res\n N = 0\n\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s736087052', 's223594008'] | [9924.0, 9880.0] | [36.0, 34.0] | [339, 525] |
p02629 | u238940874 | 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 a=n%26\n if n%26 == 0:\n a=26\n ans.append(chr(a+96))\n n=n//26\nprint(ans)\nans.reverse()\nprint(''.join(ans))", "n=int(input())\nans=[]\nwhile n>0:\n n-=1\n a=n%26\n ans.append(chr(ord('a')+a))\n n=n//26\nans.reverse()\nprint(''.join(ans))"] | ['Wrong Answer', 'Accepted'] | ['s818489557', 's469609585'] | [9184.0, 9008.0] | [31.0, 27.0] | [157, 130] |
p02629 | u240630407 | 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\n# import math\n# import sys\n# import numpy as np\n\nN = int(input())\n# S = input()\n# n, *a = map(int, open(0))\n# X, N = map(int, input().split())\n# P = list(map(int, input().split()))\n# Q = list(map(int, input().split()))\n# S = input()\n\n\n# all_cases = list(itertools.permutations(P))\n# a = list(itertools.combinations_with_replacement([i for i in range(1, M + 1)], N))\n# print(a[0][0])\n# print(conditions[0])\n\nabcs = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nwhile(N > 0):\n # if N == 26:\n # ans += "z"\n # break\n N -= 1\n _ = N % 26\n # print(N % 26)\n N //= 26\n print(N)\n ans += abcs[_]\n # print()\n\nprint(ans[::-1])', '# import itertools\n# import math\n# import sys\n# import numpy as np\n\nN = int(input())\n# S = input()\n# n, *a = map(int, open(0))\n# X, N = map(int, input().split())\n# P = list(map(int, input().split()))\n# Q = list(map(int, input().split()))\n# S = input()\n\n\n# all_cases = list(itertools.permutations(P))\n# a = list(itertools.combinations_with_replacement([i for i in range(1, M + 1)], N))\n# print(a[0][0])\n# print(conditions[0])\n\nabcs = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nwhile(N > 0):\n _ = N % 26\n print(N % 26)\n N //= 26\n print(N)\n ans += abcs[_ - 1]\n print()\n\nprint(ans[::-1])', '# import itertools\n# import math\n# import sys\n# import numpy as np\n\nN = int(input())\n# S = input()\n# n, *a = map(int, open(0))\n# X, N = map(int, input().split())\n# P = list(map(int, input().split()))\n# Q = list(map(int, input().split()))\n# S = input()\n\n\n# all_cases = list(itertools.permutations(P))\n# a = list(itertools.combinations_with_replacement([i for i in range(1, M + 1)], N))\n# print(a[0][0])\n# print(conditions[0])\n\nabcs = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nwhile(N > 0):\n # if N == 26:\n # ans += "z"\n # break\n N -= 1\n _ = N % 26\n # print(N % 26)\n N //= 26\n # print(N)\n ans += abcs[_]\n # print()\n\nprint(ans[::-1])\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s675645724', 's826255975', 's994330098'] | [9164.0, 9168.0, 9152.0] | [31.0, 31.0, 28.0] | [717, 651, 720] |
p02629 | u243312682 | 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 for i in range(1, 12):\n if n <= 26**i:\n n -= 1\n for j in range(i):\n a = n % 26\n ans.append(chr(97+a))\n n = n // 26\n break\n else:\n n -= 26**i\n print(*ans[::-1], sep='')", "def main():\n n = int(input())\n ans = []\n for i in range(1, 12):\n if n <= 26**i:\n n -= 1\n for j in range(i):\n a = n % 26\n ans.append(chr(97+a))\n n = n // 26\n break\n else:\n n -= 26**i\n print(*ans[::-1], sep='')\n \nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s532282469', 's048281033'] | [9124.0, 9132.0] | [34.0, 33.0] | [323, 363] |
p02629 | u244434589 | 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 = n-1\n s += chr(ord('a') + (n)% 26)\n n//=26\nans = ans[::-1]\nprint(ans)", "n=int(input())\ns = ''\nwhile n>0:\n s += chr(ord('a') + (n-1)% 26)\n (n-1)//=26\n\nprint(s[::-1])\n", "n=int(input())\nans = ''\nwhile n>0:\n n = n-1\n ans += chr(ord('a') + (n)% 26)\n n//=26\nans = ans[::-1]\nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s190163930', 's477871019', 's488131357'] | [9088.0, 9000.0, 9092.0] | [29.0, 26.0, 29.0] | [129, 107, 131] |
p02629 | u256224800 | 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())\nstrr = []\ni = 0\nwhile n > 0:\n rem = n % 26\n if rem == 0:\n strr.append(\'z\')\n n = (n // 26) - 1\n else:\n strr.append(chr((rem - 1) + ord(\'a\')))\n n = n // 26\nstrr.append(\'\\0\')\n# strr = strr[::-1]\nprint("".join(strr))\n', '\nn = int(input())\nstrr = []\ni = 0\nwhile n > 0:\n rem = n % 26\n if rem == 0:\n strr.append(\'z\')\n n = (n // 26) - 1\n else:\n strr.append(chr((rem - 1) + ord(\'a\')))\n n = n // 26\nstrr = strr[::-1]\nprint("".join(strr))\n'] | ['Wrong Answer', 'Accepted'] | ['s420408187', 's951269775'] | [9112.0, 9180.0] | [31.0, 27.0] | [268, 248] |
p02629 | u262039080 | 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())\nNN=num2alpha(N)\nprint(NN.lower())\n'] | ['Wrong Answer', 'Accepted'] | ['s525198675', 's657927401'] | [9168.0, 9188.0] | [26.0, 30.0] | [221, 236] |
p02629 | u262227581 | 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='abcdefghijjklmnopqrstuvwxyz'\nname=''\nwhile n>=26:\n name+=a[n%26]\n n//=26\nname+=a[n]\nprint(name)", "n=int(input())\na='abcdefghijjklmnopqrstuvwxyz'\nname=''\nwhile n>=26:\n name.append(a[n%26])\n n//=26\nname.append(a[n])\nprint(name)", "a='abcdefghijklmnopqrstuvwxyz'\nout=''\nn=int(input())\nwhile n>26:\n out=a[n%26+1]+out\n n//=26\nprint(out)", "a = 'abcdefghijklmnopqrstuvwxyz'\nn = int(input())\nr = 26\nd = 1\nwhile n-r > 0:\n n -= r\n r *= 26\n d += 1\nn -= 1\nname = ''\nfor i in range(d):\n if n >= 26:\n name = a[n % 26]+name\n n //= 26\n elif n > 0:\n name = a[n]+name\n n = 0\n else:\n name = a[n]+name\nprint(name)"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s233602620', 's310205529', 's896535924', 's965746839'] | [8980.0, 9024.0, 9176.0, 9032.0] | [30.0, 22.0, 27.0, 28.0] | [115, 129, 104, 312] |
p02629 | u265118937 | 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 itertools\nimport resource\nxrange = lambda stop: iter(itertools.count().next, stop)\nsys.setrecursionlimit(1000000)\nys.setrecursionlimit(10 ** 9)\nresource.setrlimit(resource.RLIMIT_STACK, (-1, -1))\nn = int(input())\n\nchars ={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'}\n\nif n <= 26:\n print(chars[n])\n sys.exit()\n\n\n\ndef Base_10_to_26(X):\n if (X//26):\n return Base_10_to_26(int(X//26))+chars[int(X%26)]\n return chars[int(X%n)]\n\nprint(Base_10_to_26(n))\n", 'import sys\nimport itertools\n#import resource\n#xrange = lambda stop: iter(itertools.count().next, stop)\n\n\nn = int(input())\n\nchars ={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\'}\n\nif n <= 26:\n print(chars[n])\n sys.exit()\n\n\nans = []\nwhile True:\n n -= 1\n ans.append(chr(ord("a") + n % 26))\n n //= 26\n if n <= 0:\n break\nfor i in range(len(ans)):\n print(ans[-i-1], end="")'] | ['Runtime Error', 'Accepted'] | ['s336491931', 's359857580'] | [9204.0, 9164.0] | [26.0, 29.0] | [664, 636] |
p02629 | u267717963 | 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='))\nP=''\nwhile True :\n N=(N-1)//26\n P=chr(ord('a')+(N-1)%26)+P\n if N <= 0 :\n break\nprint(P)", "N=int(input())\nP=''\nwhile True :\n P=chr(ord('a')+(N-1)%26)+P\n N=(N-1)//26\n if N <= 0 :\n break\nprint(P)"] | ['Wrong Answer', 'Accepted'] | ['s645768312', 's425897050'] | [9056.0, 9160.0] | [29.0, 27.0] | [122, 118] |
p02629 | u268318377 | 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\n\nN = int(input())\nS = string.ascii_lowercase\n\nans = ''\nif N <= 26:\n ans = S[N - 1]\n\nwhile True:\n N, b = divmod(N, 26)\n ans = S[b - 1] + ans\n if b == 0:\n N -= 1\n\n if N <= 26:\n ans = S[N - 1] + ans\n break\n\nprint(ans)", "import string\n \n\nN = int(input())\nS = string.ascii_lowercase\n \nans = ''\n\nwhile N > 0:\n N, b = divmod(N - 1, 26)\n ans = S[b] + ans\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s468753552', 's084329327'] | [9972.0, 9972.0] | [38.0, 37.0] | [265, 147] |
p02629 | u268822556 | 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 > 26:\n N, mod = divmod(N, 26)\n if mod == 0: mod = 26 \n ans += chr(96+mod)\n if N < 27:break\nans += chr(96+mod) \nprint(ans[::-1])', 'N = int(input())\nans = ""\nwhile N > 26:\n N, mod = divmod(N, 26)\n if mod == 0: mod = 26 \n print(N,mod)\n ans += chr(96+mod)\n if N < 27:break\nans += chr(96+mod) \nprint(ans[::-1])', 'def f(N):\n if N == 0: return ""\n N -= 1\n return f(N//26) + chr(97 + N%26)\n\nN = int(input())\nprint(f(N))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s496880861', 's701181026', 's297682521'] | [9184.0, 9208.0, 8992.0] | [31.0, 32.0, 27.0] | [173, 190, 112] |
p02629 | u277312083 | 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\nans = ""\nwhile n:\n n -= 1\n ans = chr(96 + n % 26) + ans\n n //= 26\n\nprint(ans)\n', 'n = int(input())\n\nans = ""\nwhile n:\n n -= 1\n ans = chr(97 + n % 26) + ans\n n //= 26\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s527672554', 's571185038'] | [9100.0, 9156.0] | [29.0, 33.0] | [105, 105] |
p02629 | u283751459 | 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\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', 'N = int(input())\n\nif N<=26:\n\treturn chr(64+num)\nelif N%26==0:\n return num2alpha(N//26-1)+chr(90)\nelse:\n return num2alpha(N//26)+chr(64+N%26)\n\n \n', "N = int(input())\n\nnum=0\nfor index, item in enumerate(list(N)):\n\tnum += pow(26,len(N)-index-1)*(ord(item)-ord('A')+1)\n\n\nif num<=26:\n\treturn chr(64+num)\nelif num%26==0:\n return num2alpha(num//26-1)+chr(90)\nelse:\n return num2alpha(num//26)+chr(64+num%26)\n\n ", 'N = int(input())\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\nreturn num2alpha(N)', 'N = int(input())\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\nprint(num2alpha(N).lower())\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s320037182', 's487761090', 's671033387', 's698063721', 's386859750'] | [9164.0, 8936.0, 9100.0, 9084.0, 9156.0] | [35.0, 29.0, 27.0, 24.0, 34.0] | [225, 151, 261, 224, 233] |
p02629 | u285358283 | 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?" | ['alphabet = "abcdefghijklmnopqrstuvwxyz"\n\nN = int(input())\n\nans = ""\nfor i in range(1,100):\n print(N)\n r = N % 26\n ans += alphabet[r-1]\n N = (N-r) // 26\n if N <= 0: break\n\nprint(ans[::-1])', 'alphabet = "abcdefghijklmnopqrstuvwxyz"\n\nN = int(input())\n\nans = ""\nwhile N > 0:\n r = (N-1) % 26\n ans += alphabet[r]\n N = (N-r) // 26\n\nprint(ans[::-1])'] | ['Wrong Answer', 'Accepted'] | ['s495452422', 's947729872'] | [9136.0, 9028.0] | [28.0, 29.0] | [202, 160] |
p02629 | u286623856 | 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\n\nN = int(input()) \nK = 26 \n\nal = [chr(i) for i in range(97, 97+K)]\n\n\ndef change(N):\n \n keta = 0\n \n \n tmp = 0\n for i in range(10**9):\n if N < K**i + tmp:\n keta = i\n break\n tmp += K**i\n ans = [0] * keta \n \n\n \n check = 0\n for i in range(1, keta+1):\n j = N // (K ** (keta - i))\n if j * (K ** (keta - i)) == N and i != keta:\n j -= 1\n N -= j * (K**(keta-i))\n ans[check] = j\n check += 1\n return ans\n\n\nfor i in change(N):\n print(al[i-1], end='')\n", "\n\n\nN = int(input()) \nK = 26 \n\nal = [chr(i) for i in range(97, 97+K)]\n\n\ndef change(N):\n \n keta = 0\n \n \n tmp = 0\n for i in range(10**9):\n if N < K**i + tmp:\n keta = i\n break\n tmp += K**i\n ans = [0] * keta \n \n\n \n check = 0\n for i in range(1, keta+1):\n j = N // (K ** (keta - i))\n if j == 27:\n j -= 1\n if i != keta and j * (K ** (keta - i)) == N:\n j -= 1\n N -= j * (K**(keta - i))\n ans[check] = j\n check += 1\n # print(ans)\n return ans\n\n\nfor i in change(N):\n print(al[i-1], end='')\n", "# coding: utf-8\n# Your code here!\n\nN=int(input())\nK=26\n\nal = [chr(i) for i in range(97, 97+K)]\n\ndef change(N):\n keta=0\n \n for i in range(10**9):\n if N <= K**i:\n keta = i\n break\n ans=[0]*keta \n check=0\n for i in range(1,keta+1):\n j = N//(K**(keta-i))\n ans[check]=j\n check+=1\n N-=(j)*(K**(keta-i))\n return ans\n \nfor i in change(N):\n print(al[i-1],end = '')\n \n", "# coding: utf-8\n# Your code here!\n\nN=int(input())\nK=26\n\nal = [chr(i) for i in range(97, 97+K)]\n\ndef change(N):\n keta=0\n \n tmp = 0\n for i in range(10**9):\n if N < K**i + tmp:\n keta = i\n break\n tmp += K**i\n ans=[0]*keta \n check=0\n for i in range(1,keta+1):\n j = N//(K**(keta-i))\n ans[check]=j\n check+=1\n N-=(j)*(K**(keta-i))\n return ans\n \nfor i in change(N):\n print(al[i-1],end = '')\n \n", "\n\n\nN = int(input()) \nK = 26 \n\nal = [chr(i) for i in range(97, 97+K)]\n\n\ndef change(N):\n \n keta = 0\n \n \n tmp = 0\n for i in range(10**9):\n if N < K**i + tmp:\n keta = i\n break\n tmp += K**i\n ans = [0] * keta \n print(tmp)\n \n\n \n check = 0\n for i in range(1, keta+1):\n j = N // (K ** (keta - i))\n print(j, N - (j * (K ** (keta - i))))\n if i != keta and N - (j * (K ** (keta - i))) < tmp:\n j -= 1\n if j == 27:\n j -= 1\n N -= j * (K ** (keta - i))\n tmp -= K**(keta - i)\n ans[check] = j\n check += 1\n # print(ans)\n return ans\n\n\nfor i in change(N):\n print(al[i-1], end='')\n", "# coding: utf-8\n# Your code here!\n\nN=int(input())\nK=26\n\nal = [chr(i) for i in range(97, 97+K)]\n\ndef change(N):\n keta=0\n \n tmp = 0\n for i in range(10**9):\n if N < K**i + tmp:\n keta = i\n break\n tmp += K**i\n ans=[0]*keta \n check=0\n for i in range(1,keta+1):\n j = N//(K**(keta-i))\n if(j == 27):\n j -= 1\n ans[check] = j\n check += 1\n N -= j * (K**(keta-i))\n return ans\n \nfor i in change(N):\n print(al[i-1], end = '')\n \n", "\n\ndef main():\n N = int(input())\n digits = []\n\n while N != 0:\n digits.append(N % 26)\n if digits[-1] == 0:\n digits[-1] = 26\n N //= 26\n N -= 1\n else:\n N //= 26\n digits.reverse()\n for d in digits:\n print(chr(96 + d), end='')\n print() \n\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s068625000', 's131966122', 's214240633', 's248390486', 's548427017', 's679555188', 's372945045'] | [9020.0, 9220.0, 9152.0, 9136.0, 9148.0, 9220.0, 8948.0] | [31.0, 26.0, 28.0, 32.0, 29.0, 27.0, 29.0] | [1072, 1130, 534, 571, 1175, 616, 370] |
p02629 | u289288647 | 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, i = 0, 1\ndef toN(X, n):\n if (int(X/n)):\n return toN(int(X/n), n)+str(X%n).zfill(2)\n return str(X%n).zfill(2)\n\nwhile N > ans + 26**i:\n ans += 26**i\n i += 1\n \na = toN(N, 26)\nlang = []\n\nfor j in range(0, i*2, 2):\n if j == 0:\n lang.append('a')\n else:\n lang.append(chr(int(a[j:j+2])+96))\n pre = int(a[j:j+2])\n \nprint(''.join(lang))\n", 'N = int(input())\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\nans = num2alpha(N)\n\nprint(ans.lower())\n'] | ['Wrong Answer', 'Accepted'] | ['s728450384', 's476472238'] | [9200.0, 9088.0] | [27.0, 28.0] | [401, 244] |
p02629 | u290014241 | 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?" | ["=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=''\nM=[26**i for i in range(12)]\nS=[]\nk=0\nfor i in range(11):\n k=k+M[i]\n if N<k:\n m=k-M[i]\n N=N-m\n L=[0]\n n=0\n for j in range(1, i+1):\n L.append(N%M[j])\n s=Al[(L[j]-L[j-1])//M[j-1]]+s\n break\nprint(s)", "N=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=''\nM=[26**i for i in range(12)]\nk=0\nfor i in range(12):\n k=k+M[i]\n if N<k:\n m=k-M[i]\n N=N-m\n L=[0]\n n=0\n for j in range(1, i+1):\n L.append(N%M[j])\n s=Al[(L[j]-L[j-1])//M[j-1]]+s\n break\nprint(s)"] | ['Runtime Error', 'Accepted'] | ['s624028245', 's855766373'] | [8868.0, 9200.0] | [29.0, 29.0] | [393, 389] |
p02629 | u293215208 | 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()\n\ns = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nn, m = 0, 0\n\nfor i in range(1, 1000):\n m += 26 ** i\n if N <= m:\n n = i\n break\n\nfor i in range(n):\n a, b = divmod(N, 26)\n N = a\n if b == 0:\n ans += s[25]\n N -= 1\n else:\n ans += s[b-1]\n\nans1 = \'\'.join(list(reversed(ans)))\nprint(ans1)', 'N = 1000\n\ns = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nM, n, m = 0, 0, 0\n\nfor i in range(1, 1000):\n m += 26**i\n if N <= m:\n M = N + 26**i -m\n n = i - 1\n break\n\nfor i in reversed(range(n + 1)):\n a, b = divmod(M, 26**i)\n M = b\n if i == 0:\n ans += s[a-1]\n else:\n ans += s[a]\n\nprint(ans)', 'N = int(input())\n \ns = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nn, m = 0, 0\n \nfor i in range(1, 1000):\n m += 26**i\n if N <= m:\n n = i -1\n break\n\nfor i in reversed(range(n)):\n a, b = divmod(N, 26**i)\n N = b\n if not a ==0:\n ans += s[a-1]\n else:\n ans += s[25]\n\nprint(ans)', 'N = input()\n \ns = "abcdefghijklmnopqrstuvwxyz"\nm = 0\nans = ""\nM,n = 0,0\n\nfor i in range(1,1000):\n m += 26**i\n if N <= m:\n M = N + 26**i\u3000- m\n n = i-1\n break\n\nfor i in reversed(range(n+1)):\n a, b = divmod(M, 26**i)\n M = b\n ans = ans + s[a]\n\nprint(ans)', 'N = map(int, input())\n \ns = "abcdefghijklmnopqrstuvwxyz"\nm = 0\nans = ""\n \nfor i in range(1,1000):\n m += 26**i\n if N <= m:\n M = N + 26**i\u3000- m\n n = i-1\n break\n\nfor i in reversed(range(n)):\n a, b = divmod(M, 26**i)\n M = b\n ans = ans + s[a]\n\nprint(ans)', 'N = map(int, input())\n\nC = "abcdefghijklmnopqrstuvwxyz"\nm = 0\nans = ""\n\nfor i in range(1,1000):\n m += 26**i\n if N <= m:\n M = N - m + 26**i\n n = i-1\n break\n\nfor i in revesed(range(n)):\n a, b = divmod(M, 26**i)\n M = b\n ans = ans + C[a]\n\nprint(ans)\n ', 'N = input()\n\ns = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nM, n, m = 0, 0, 0\n\nfor i in range(1, 1000):\n m += 26**i\n if N <= m:\n M = N + 26**i -m\n n = i - 1\n break\n\nfor i in reversed(range(n + 1)):\n a, b = divmod(M, 26**i)\n M = b\n if i == 0:\n ans += s[a-1]\n else:\n ans += s[a]\n\nprint(ans)', 'N = int(input())\n\ns = "abcdefghijklmnopqrstuvwxyz"\nans = ""\nn, m = 0, 0\n\nfor i in range(1, 1000):\n m += 26 ** i\n if N <= m:\n n = i\n break\n\nfor i in range(n):\n a, b = divmod(N, 26)\n N = a\n if b == 0:\n ans += s[25]\n N -= 1\n else:\n ans += s[b-1]\n\nans1 = \'\'.join(list(reversed(ans)))\nprint(ans1)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s448385186', 's595930216', 's607899313', 's759652652', 's837464269', 's840170922', 's983149093', 's040204537'] | [9092.0, 8964.0, 9116.0, 8936.0, 9004.0, 9064.0, 9024.0, 9208.0] | [26.0, 30.0, 30.0, 27.0, 28.0, 26.0, 28.0, 28.0] | [339, 333, 307, 265, 264, 262, 336, 344] |
p02629 | u294703554 | 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?" | ["for _ in range(int(input())):\n n = int(input())\n d = ['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 a = ''\n while n:\n n -= 1\n a = d[n % 26] + a\n n //= 26\n print(a)", "for _ in range(int(input())):\n n = int(input())\n d = ['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', 'z']\n a = ''\n f = 0\n if n % 26 == 0:\n f = 1\n while n > f:\n a = d[n % 26] + a\n n //= 26\n print(a)", "n = int(input())\nd = ['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', 'z']\na = ''\nf = 0\nif n % 26 == 0:\n f = 1\n while n > f:\n a = d[n % 26] + a\n n //= 26\n print(a)", "n = int(input())\nd = ['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']\na = ''\nwhile n:\n n -= 1\n a = d[n % 26] + a\n n //= 26\nprint(a)"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s364240831', 's779672078', 's867599876', 's825456823'] | [9200.0, 9208.0, 9208.0, 9188.0] | [25.0, 28.0, 32.0, 26.0] | [284, 322, 256, 216] |
p02629 | u295120316 | 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())\nnamelist = []\nnum2alpha = lambda c: chr(c+64)\nfor i in range(10):\n q = N//26\n mod = N%26\n N = q\n namelist.append(num2alpha(mod))\n if N <= 26:\n break\nnamelist.append(num2alpha(N))\nnamelist.reverse()\nans = ''.join(namelist)\n\nprint(ans.lower())", "N = int(input())\nnamelist = []\nnum2alpha = lambda c: chr(c+64)\nfor i in range(20):\n q = N//26\n mod = N%26\n N = q\n namelist.append(num2alpha(mod))\n if N <= 26:\n break\nnamelist.append(num2alpha(N))\nnamelist.reverse()\nans = ''.join(namelist)\n\nprint(ans.lower())", "N = int(input())\nnamelist = []\nnum2alpha = lambda c: chr(c+64)\nfor i in range(20):\n if N <= 26:\n namelist.append(num2alpha(N))\n break\n \n if N % 26 == 0:\n namelist.append('z')\n N = (N//26)-1\n else:\n mod = N%26\n namelist.append(num2alpha(mod))\n N = (N//26)\n \nwhile '' in namelist:\n namelist.remove('')\nnamelist.reverse()\nans = ''.join(namelist)\n\nprint(ans.lower())"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s038878444', 's937137350', 's454179124'] | [9176.0, 9200.0, 9204.0] | [34.0, 31.0, 32.0] | [280, 280, 430] |
p02629 | u299645128 | 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())\neList = ['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 = N\nmod = N\nnumList = []\n\nwhile n > 0:\n n, mod = divmod(n,26)\n if mod != 0:\n numList.insert(0, mod - 1)\n else:\n numList.insert(0, 25)\n n -= 1\nprint(numList)", "N = int(input())\neList = ['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 = N\nmod = N\nnumList = []\n \nwhile n > 0:\n n, mod = divmod(n,26)\n if mod != 0:\n numList.insert(0, mod - 1)\n else:\n numList.insert(0, 25)\n n -= 1\nfor num in numList:\n ans += eList[num]\nprint(ans)", "N = int(input())\neList = ['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 = N\nmod = N\nnumList = []\n\nwhile n > 0:\n n, mod = divmod(n,26)\n if mod != 0:\n numList.insert(0, mod - 1)\n else:\n numList.insert(0, 25)\n n -= 1\nfor num in numList:\n if num != 0:\n ans += eList[num]\nprint(ans)", "N = int(input())\neList = ['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 = N\nmod = N\nnumList = []\n \nwhile n > 0:\n n, mod = divmod(n,26)\n if mod != 0:\n numList.insert(0, mod - 1)\n else:\n numList.insert(0, 25)\n n -= 1\nans =''\nfor num in numList:\n ans += eList[num]\nprint(ans)"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s012298965', 's729586601', 's830772360', 's104561785'] | [9184.0, 9196.0, 9124.0, 9176.0] | [26.0, 27.0, 27.0, 27.0] | [301, 338, 354, 346] |
p02629 | u304058693 | 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())\n\nnum = int(math.log(1000000000000001, 26))\n#print(num)\n\n\ny, z = n, n\ny_lis = []\n\nfor i in range(num + 1):\n if z >= 1:\n y_lis.append(z % 26)\n z = z // 26\n elif z == 0:\n break\nprint(y_lis)\n\n\nfor i in range(len(y_lis) - 1):\n if y_lis[i] == 0:\n y_lis[i] = 26\n y_lis[i + 1] -= 1\n\nif y_lis[-1] == 0:\n y_lis.remove(y_lis[-1])\nprint(y_lis)\ny_lis = list(reversed(y_lis))\nans = ""\nfor i in range(len(y_lis)):\n y_lis[i] = chr(y_lis[i] + 96)\n ans += y_lis[i]\nprint(ans)\n', 'import math\nn = int(input())\n\nnum = int(math.log(1000000000000001, 26))\n#print(num)\n\n\ny, z = n, n\ny_lis = []\n\nfor i in range(num):\n if z >= 1:\n y_lis.append(z % 26)\n z = z // 26\n elif z == 0:\n break\nprint(y_lis)\n\n\nfor i in range(len(y_lis) - 1):\n if y_lis[i] == 0:\n y_lis[i] = 26\n y_lis[i + 1] -= 1\n\nif y_lis[-1] == 0:\n y_lis.remove(y_lis[-1])\n#print(y_lis)\ny_lis = list(reversed(y_lis))\nans = ""\nfor i in range(len(y_lis)):\n y_lis[i] = chr(y_lis[i] + 96)\n ans += y_lis[i]\nprint(ans)\n', 'import math\nn = int(input())\n\nnum = int(math.log(1000000000000001, 26))\n#print(num)\n\n\ny, z = n, n\ny_lis = []\n\nfor i in range(100):\n if z >= 1:\n y_lis.append(z % 26)\n z = z // 26\n elif z == 0:\n break\n#print(y_lis)\n\n\nfor i in range(len(y_lis) - 1):\n if y_lis[i] <= 0:\n y_lis[i] = y_lis[i] + 26\n y_lis[i + 1] -= 1\n\nif y_lis[-1] == 0:\n y_lis.remove(y_lis[-1])\n#print(y_lis)\ny_lis = list(reversed(y_lis))\nans = ""\nfor i in range(len(y_lis)):\n y_lis[i] = chr(y_lis[i] + 96)\n ans += y_lis[i]\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s420646442', 's682456709', 's523447097'] | [9252.0, 9120.0, 9184.0] | [29.0, 31.0, 27.0] | [555, 552, 564] |
p02629 | u307516601 | 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\nsys.setrecursionlimit(10**6)\n\nn = int(input())\n\nd = {(i-97+1):chr(i)%26 for i in range(97,97+26)}\n#d[0] = 'z'\n\nl = []\n\nwhile n > 0:\n tmp = n%26\n l.append(tmp)\n if tmp == 0:\n n = n//26-1\n else:\n n //= 26\n\nans = ''\n\nfor i in l[::-1]:\n ans += d[i]\n \nprint(ans)", "import sys\nsys.setrecursionlimit(10**6)\n\nn = int(input())\n\nd = {(i-97+1)%26:chr(i) for i in range(97,97+26)}\n#d[0] = 'z'\n\nl = []\n\nwhile n > 0:\n tmp = n%26\n l.append(tmp)\n if tmp == 0:\n n = n//26-1\n else:\n n //= 26\n\nans = ''\n\nfor i in l[::-1]:\n ans += d[i]\n \nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s893249811', 's283562077'] | [9200.0, 9192.0] | [23.0, 25.0] | [300, 300] |
p02629 | u307622233 | 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\n while N:\n N -= 1\n tmp = N % 26\n txt = chr(tmp + ord("a"))\n N //= 26\n\n print(ans[::-1])\n\n\nif __name__ == \'__main__\':\n main()', 'def main():\n N = int(input())\n ans = ""\n\n while N > 26:\n tmp = N % 26\n txt = "z" if tmp == 0 else chr(tmp + 96)\n # if tmp == 0:\n # ans += "z"\n # else:\n # ans += chr(tmp + 96)\n ans += txt\n \n N //= 26\n else:\n txt = "z" if tmp == 0 else chr(tmp + 96)\n ans += txt\n\n print(ans[::-1])\n\n\nif __name__ == \'__main__\':\n main()\n', 'def main():\n N = int(input())\n ans = ""\n\n while N > 26:\n tmp = N % 26\n txt = "z" if tmp == 0 else chr(tmp + 96)\n ans += txt\n print(f"{ans = }. {N = }")\n N //= 26\n else:\n txt = "z" if tmp == 0 else chr(tmp + 96)\n ans += txt\n\n print(ans[::-1])\n\n\nif __name__ == \'__main__\':\n main()', 'def main():\n N = int(input())\n ans = ""\n\n while N:\n N -= 1\n tmp = N % 26\n ans += chr(tmp + ord("a"))\n N //= 26\n\n print(ans[::-1])\n\n\nif __name__ == \'__main__\':\n main()'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s354676904', 's402327374', 's434748477', 's190801313'] | [9076.0, 9064.0, 9200.0, 9104.0] | [33.0, 30.0, 30.0, 34.0] | [208, 447, 345, 209] |
p02629 | u311379832 | 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\nN = int(input()) - 1\na = list(string.ascii_lowercase)\nans = ''\ntmp = 0\nwhile True:\n m, v = divmod(N, 26)\n N = m - 1\n ans += a[v]\n if N <= 25:\n break\nif N != 0:\n ans += a[N]\nprint(ans[::-1])", "import string\nN = int(input()) - 1\na = list(string.ascii_lowercase)\nans = ''\ntmp = 0\nm = 0\nwhile True:\n m, v = divmod(N, 26)\n if m == 0:\n N = m\n else:\n N = m - 1\n ans += a[v]\n if N <= 25:\n break\nif m != 0:\n ans += a[N]\nprint(ans[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s047416019', 's729771811'] | [9892.0, 10000.0] | [39.0, 41.0] | [225, 274] |
p02629 | u314188085 | 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())-1\nmod = [N%26]\nwhile N>=26:\n N = int(N/26)\n mod.append(N%26-1)\n \nmod.reverse()\nprint(mod)\nans = [chr(i+ord('a')) for i in mod]\nprint(''.join(ans))", "N = int(input())\nans = ['']\n\nwhile N>0:\n N = N - 1\n ans.append(chr(int(N%26+1)+ord('a')-1))\n N = int(N/26)\n \nans.reverse()\nprint(''.join(ans))"] | ['Wrong Answer', 'Accepted'] | ['s230318873', 's534659672'] | [9100.0, 9076.0] | [30.0, 27.0] | [172, 154] |
p02629 | u314350544 | 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 = ''\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", "string_array = [chr(i) for i in range(97, 97+26)]\nprint(string_array)\nvalue = int(input())\n\nvalue_range = 0\nfor l in range(1, 12):\n value_range += 26**l\n if value_range >= value:\n break\n\nanswer_array = []\n\nfor l in range(1, l+1):\n q = value // 26\n r = value % 26\n answer_array.append(r)\n n = q\n\nprint(answer_array)\n\nanswer = ''\nfor i in answer_array[::-1]:\n answer += string_array[i-1]\n\nprint(answer)\n", "string_array = [chr(i) for i in range(97, 97+26)]\nprint(string_array)\nvalue = int(input())\n\nvalue_range = 0\nfor l in range(1, 12):\n value_range += 26**l\n if value_range >= value:\n break\n\nanswer_array = []\n\nfor l in range(1, l+1):\n q = value // 26\n r = value % 26\n if r == 0:\n q -= 1\n answer_array.append(r)\n n = q\n\nprint(answer_array)\n\nanswer = ''\nfor i in answer_array[::-1]:\n answer += string_array[i-1]\n\nprint(answer)\n", "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"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s406284932', 's416076398', 's515588502', 's021584937'] | [9084.0, 9188.0, 9104.0, 9112.0] | [31.0, 29.0, 32.0, 28.0] | [241, 429, 459, 237] |
p02629 | u315600877 | 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())\nlista=["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"]\namari=[]\nans=""\nwhile N!=0:\n (x,y)=divmod(N,26)\n amari.append(y)\n N=x\namari=amari[::-1]\nprint(amari)\nwhile 0 in amari[1:]:\n for i in range(len(amari)-1):\n if amari[i+1]==0:\n amari[i]-=1\n amari[i+1]=26\nif amari[0]==0:\n amari.pop(0)\nprint(amari)\nprint(amari)\nfor i in amari:\n ans+=lista[i-1]\nprint(ans)', 'N=int(input())\nlista=["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"]\namari=[]\nans=""\nwhile N!=0:\n (x,y)=divmod(N,26)\n amari.append(y)\n N=x\namari=amari[::-1]\nwhile 0 in amari[1:]:\n for i in range(len(amari)-1):\n if amari[i+1]==0:\n amari[i]-=1\n amari[i+1]=26\nif amari[0]==0:\n amari.pop(0)\nfor i in amari:\n ans+=lista[i-1]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s042189584', 's086269518'] | [9248.0, 9072.0] | [33.0, 32.0] | [488, 449] |
p02629 | u321875637 | 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 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 print(ans[::-1]) # reversed", "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'] | ['s798200380', 's988074778', 's324687848'] | [9008.0, 8764.0, 9156.0] | [23.0, 23.0, 27.0] | [115, 192, 94] |
p02629 | u322171361 | 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\nwhile True:\n i+=1\n if (26**i-1)/25*26>=n:\n n-=(26**i-1)/25*26\n break\ndef sisu(n, b):\n\u3000if (int(n/b)):\n\u3000\u3000return sisu(int(n/b), b) + chr(n%b+65)\n\u3000return chr(n%b+65)\naa=sisu(n,26)\naa="a"*(i-len(aa))+aa\nprint(aa)', "n=int(input())\na=''\nwhile n != 0:\n n-=1\n a=chr(int(97+n%26))+a\n n//=26\nprint(a)"] | ['Runtime Error', 'Accepted'] | ['s710649527', 's925012720'] | [8960.0, 9108.0] | [26.0, 29.0] | [254, 82] |
p02629 | u326943507 | 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?" | ['abc=[\'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\']\nS=""\nn=int(input())\nfor i in range(0, 11):\n if int(n//(26**(i+1)))>=2:\n S+=abc[((n- (n//(26**(i+1))*(26**(i+1))) )//(26**i))]\n n-=(n- (n//(26**(i+1))*(26**(i+1))) )//(26**i)\n else:\n S+=abc[((n-(n//(26**(i+1))*(26**(i+1))))//(26**i))-1]\n break\n \nprint(S[::-1])', 'abc=[\'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\']\nabc_n=[26,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]\nS=""\nn=int(input())\nfor i in range(0, 11):\n if (n//26)>=1:\n S+=abc[n%26]\n n=int((n-abc_n[n%26])/26)\n elif n==0:\n break\n else:\n S+=abc[n%26]\n break\n \nprint(S[::-1])\n'] | ['Wrong Answer', 'Accepted'] | ['s687967241', 's244437796'] | [9236.0, 9228.0] | [33.0, 33.0] | [410, 402] |
p02629 | u328179275 | 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?" | ["list = [0,'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']\nnum_list =[0]\nfor i in range(1,15):\n num_list.append(26**i+num_list[i-1])\n\nn = int(input())\ni = 0\nwhile True:\n if num_list[i] >= n:\n break\n else:\n i +=1\n\n\nword = []\nfor j in range(i,0,-1):\n x = n//26**(j-1)\n elif x==27:\n word.append(26)\n n = n -26**(j-1)*(n//26**(j-1))+26**(j-1)\n else:\n word.append(x)\n n = n -26**(j-1)*(n//26**(j-1))\nwhile 0 in word:\n p = word.index(0)\n word[p-1] = word[p-1]-1\n word[p] = 26\nh =''\nfor k in range(len(word)):\n h+=str(list[word[k]])\nprint(h)", "n = int(input())\nlist=[0,'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']\nword = []\ni = 12\nwhile i>=0:\n x = n//(26**i)\n word.append(x)\n n = n-x*26**i\n\nwhile True:\n word = int(''.join(word)).split()\n if 0 in word:\n p = word.index(0)\n word[p-1] = word[p-1]-1 \n word[p] = 26\n else:\n break\n\nh=''\nfor i in range(len(word)):\n h += list[word[i]]\nprint(h)", "n = int(input())\nlist=[0,'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']\nword = []\ni = 12\nwhile i>=0:\n x = n//(26**i)\n word.append(x)\n n = n-x*26**i\n i -= 1\n\nwhile True:\n word = int(''.join(word)).split()\n if 0 in word:\n p = word.index(0)\n word[p-1] = word[p-1]-1 \n word[p] = 26\n else:\n break\n\nh=''\nfor i in range(len(word)):\n h += list[word[i]]\nprint(h)\n", "n = int(input())\nlist=[0,'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']\nword = []\ni = 12\nwhile i>=0:\n x = n//(26**i)\n word.append(x)\n n = n-x*26**i\n i -= 1\n\nwhile True:\n word = int(''.join(word)).split()\n if 0 in word:\n p = word.index(0)\n word[p-1] = word[p-1]-1 \n word[p] = 26\n else:\n break\n\nh=''\nfor i in range(len(word)):\n h += list[word[i]]\nprint(h)", "list = [0,'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']\nnum_list =[0]\nfor i in range(1,15):\n num_list.append(26**i+num_list[i-1])\n\nn = int(input())\ni = 0\nwhile True:\n if num_list[i] >= n:\n break\n else:\n i +=1\n\n\nword = []\nfor j in range(i,0,-1):\n x = n//26**(j-1)\n if x==27:\n word.append(26)\n n = n -26**(j-1)*(n//26**(j-1))+26**(j-1)\n else:\n word.append(x)\n n = n -26**(j-1)*(n//26**(j-1))\nwhile True:\n if 0 in word:\n p = word.index(0)\n word[p-1] = word[p-1]-1\n word[p] = 26\n else:\n break\nh =''\nfor k in range(len(word)):\n h+=str(list[word[k]])\nprint(h)"] | ['Runtime Error', 'Time Limit Exceeded', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s003415311', 's027739490', 's205631757', 's650979321', 's096124138'] | [8960.0, 38604.0, 9220.0, 9228.0, 9204.0] | [27.0, 2207.0, 26.0, 29.0, 32.0] | [662, 422, 432, 431, 709] |
p02629 | u332793228 | 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())\nkey=["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"]\nans=""\nN=0\nif n==26:\n ans+="z"\nif n<26:\n ans+=key[n]\nwhile n>0:\n N=n%26\n n=n//26\n ans+=key[N]\nprint(ans[::-1])', 'def f(num):\n if num<=26:\n return chr(64+num)\n elif num%26==0:\n return f(num//26-1)+chr(90)\n else:\n return f(num//26)+chr(64+num%26)\nprint(f(int(input())).lower())'] | ['Wrong Answer', 'Accepted'] | ['s080655924', 's711638661'] | [9204.0, 9140.0] | [32.0, 29.0] | [250, 192] |
p02629 | u336968242 | 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())\nabclist=[]\nfor a in 'abcdefghijklmnopqrstuvwxyz':\n abclist.append(a)\nk=0\nn=N\nalist=[]\nwhile n>0:\n amari=n%26\n if amari==0:\n n=n//26-1\n else:\n n=n//26\n alist.append(amari)\nprint(alist)\nname=''\n\nfor a in alist:\n name=abclist[a-1]+name\nprint(name)\n", "N=int(input())\nabclist=[]\nfor a in 'abcdefghijklmnopqrstuvwxyz':\n abclist.append(a)\nk=0\nn=N\nalist=[]\nwhile n>0:\n amari=n%26\n if amari==0:\n n=n//26-1\n else:\n n=n//26\n alist.append(amari)\n#print(alist)\nname=''\n\nfor a in alist:\n name=abclist[a-1]+name\nprint(name)\n"] | ['Wrong Answer', 'Accepted'] | ['s319197440', 's609468882'] | [9096.0, 9112.0] | [29.0, 35.0] | [292, 293] |
p02629 | u342563578 | 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 nume(num):\n if num<=26:\n return chr(96+num)\n elif num%26==0:\n return nume(num//26-1)+chr(126)\n else:\n return nume(num//26)+chr(96+num%26)\nnume(n)', 'n = int(input())\ndef nume(num):\n if num<=26:\n return chr(96+num)\n elif num%26==0:\n return nume(num//26-1)+chr(122)\n else:\n return nume(num//26)+chr(96+num%26)\nprint(nume(n))'] | ['Wrong Answer', 'Accepted'] | ['s768505176', 's536041437'] | [9160.0, 9136.0] | [29.0, 27.0] | [196, 203] |
p02629 | u343490140 | 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())\nx = "abcdefghijklmnopqrstuvwxyz"\na = n\ns = ""\nif n <= 26:\n print(x[n-1])\nelse:\n while a > 26:\n s += x[(a % 26) - 1]\n if a // 26 < 26 and a % 26 == 0:\n a = a // 26 - 1\n break\n else:\n a = a // 26\n s += x[a % 26 - 1]\n print(s[::-1]', 'n = int(input())\nx = "abcdefghijklmnopqrstuvwxyz"\na = n\ns = ""\nwhile a != 0:\n if a % 26 == 0:\n s += x[a % 26 - 1]\n a = a//26 - 1\n else:\n s += x[a % 26 - 1]\n a = a//26\nprint(s[::-1])'] | ['Runtime Error', 'Accepted'] | ['s452216497', 's291911270'] | [8976.0, 8972.0] | [27.0, 33.0] | [311, 215] |
p02629 | u344030307 | 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())\n\n'''\n(26**(m+1) - 26) / 25 <= n\n26**(m+1) <= 25n + 26\nm <= log(25n+26, 26) - 1\n'''\n\nm = int(math.log(25*n+26, 26) - 1)\n\nd = n - (26**(m+1) - 26) // 25\n\nalphabetTable = ['z']\nalphabetTable.extend(chr(i) for i in range(97,123))\n\nprint(alphabetTable)\n\nif d == 0:\n print('z' * m)\n\nelse:\n dd = []\n cnt = 0\n for i in range(1, m+2):\n cnt += 1\n amari = d % 26\n d = d//26 + 1\n if amari == 0:\n d -= 1\n dd.append(amari)\n if d <= 0:\n break\n \n print(cnt)\n\n\n alpha = [alphabetTable[dd[i]] for i in range(cnt)]\n alpha.extend(['a' * (m+1-cnt)])\n alpha.reverse()\n print(''.join(alpha))", "import math\n\nn = int(input())\n\n'''\n(26**(m+1) - 26) / 25 <= n\n26**(m+1) <= 25n + 26\nm <= log(25n+26, 26) - 1\n'''\n\nm = int(math.log(25*n+26, 26) - 1)\n\nd = n - (26**(m+1) - 26) // 25\n\nalphabetTable = ['z']\nalphabetTable.extend(chr(i) for i in range(97,123))\n\n\nif d == 0:\n print('z' * m)\n\nelse:\n dd = []\n cnt = 0\n for i in range(1, m+2):\n cnt += 1\n amari = d % 26\n d = d//26 + 1\n if amari == 0:\n d -= 1\n dd.append(amari)\n if d <= 0:\n break\n \n\n\n alpha = [alphabetTable[dd[i]] for i in range(cnt)]\n alpha.extend(['a' * (m+1-cnt)])\n alpha.reverse()\n print(''.join(alpha))\n"] | ['Wrong Answer', 'Accepted'] | ['s457567369', 's824104776'] | [9176.0, 9232.0] | [28.0, 30.0] | [636, 603] |
p02629 | u345389118 | 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\n\ndef base10to(n, b):\n if n // b:\n return base10to(n // b - 1, b) + ',' + str(n % b)\n return str(n % b)\n\nres_26 = base10to(N - 1, 26)\nprint(res_26)\n\nres = []\nfor s in res_26.split(','):\n res.append(chr(97 + int(s)))\n\nprint(''.join(res))\n", "N = int(input())\n\n\ndef base10to(n, b):\n if n // b:\n return base10to(n // b - 1, b) + ',' + str(n % b)\n return str(n % b)\n\nres_26 = base10to(N - 1, 26)\nprint(res_26)\n\nres = []\nfor s in res_26.split(','):\n res.append(chr(97 + int(s)))\n\nprint(''.join(reversed(res)))\n", "N = int(input())\n\n\ndef base10to(n, b):\n if n // b:\n return base10to(n // b - 1, b) + ',' + str(n % b)\n return str(n % b)\n\nres_26 = base10to(N - 1, 26)\n\nres = []\nfor s in res_26.split(','):\n res.append(chr(97 + int(s)))\n\nprint(''.join(res))"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001531719', 's988496013', 's200399919'] | [9180.0, 9100.0, 9184.0] | [34.0, 29.0, 30.0] | [270, 280, 255] |
p02629 | u346675525 | 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 \nmoji = [chr(i) for i in range(97, 97+26)]\n\nname = ''\nwhile n > 0:\n n -= 1\n name += moji[(n%26)-1]\n n = n // 26\n\n\nprint(name[::-1])", "n = int(input())\n \nmoji = [chr(i) for i in range(97, 97+26)]\n\nname = ''\nwhile n > 27:\n name += moji[(n%26)-1]\n n = n // 26\n\nif ( n > 0):\n name += moji[(n//26)*26-1]\n\nnew_str = name[::-1]\nprint(new_str)", "n = int(input())\n \nmoji = [chr(i) for i in range(97, 97+26)]\n\nname = ''\nwhile n > 27:\n name += moji[(n%26)-1]\n n = n // 26\n\nif ( n > 0):\n name += moji[(n//26)*26-1]\n\nnew_str = name[::-1]\nprint(new_str)", "n = int(input())\n \nmoji = [chr(i) for i in range(97, 97+26)]\n\nname = ''\nwhile n > 0:\n n -= 1\n name += moji[(n%26)]\n n = n // 26\n\n\nprint(name[::-1])"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s055573655', 's118996685', 's872705074', 's377619103'] | [8932.0, 9128.0, 9064.0, 9192.0] | [29.0, 35.0, 34.0, 32.0] | [153, 205, 205, 151] |
p02629 | u347134705 | 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 alpha2num(alpha):\n num=0\n for index, item in enumerate(list(alpha)):\n num += pow(26,len(alpha)-index-1)*(ord(item)-ord('a')+1)\n return num\n \nN = input()\nans = alpha2num(N)\nprint(ans)", '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())\nans = num2alpha(N)\n\nprint(ans.lower())'] | ['Wrong Answer', 'Accepted'] | ['s547618667', 's477200730'] | [9004.0, 9140.0] | [28.0, 29.0] | [203, 248] |
p02629 | u355078864 | 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 sys import stdin\n\ndef Base_10_to_n(X, n):\n X_dumy = X\n out = \'\'\n while X_dumy>0:\n out = str(X_dumy%n)+out\n X_dumy = int(X_dumy/n)\n return out\n\ndef main():\n alpha = "0ABCDEFGHIJKLMNOPQRSTUVWXYZ"\n\n n = int(input())\n x16_expr = Base_10_to_n(n, 26)\n for ch in x16_expr:\n print(alpha[int(ch)], end="")\n print("")\n\nif __name__ == "__main__":\n main()', 'from sys import stdin\n\ndef Base_10_to_n(X, n):\n if X == 26:\n return "z"\n alpha = "zabcdefghijklmnopqrstuvwxy"\n X_dumy = X\n out = \'\'\n while X_dumy>0:\n amari = X_dumy%n\n if amari == 0:\n new = alpha[amari]\n out = new+out\n X_dumy = int(X_dumy/n)-1\n else:\n new = alpha[X_dumy%n]\n out = new+out\n X_dumy = int(X_dumy/n)\n return out\n\ndef main():\n n = int(input())\n n = 78\n x16_expr = Base_10_to_n(n, 26)\n print(x16_expr)\n\nif __name__ == "__main__":\n main()', 'from sys import stdin\n\ndef Base_10_to_n(X, n):\n if X == 26:\n return "z"\n alpha = "zabcdefghijklmnopqrstuvwxy"\n X_dumy = X\n out = \'\'\n while X_dumy>0:\n amari = X_dumy%n\n if amari == 0:\n new = alpha[amari]\n out = new+out\n X_dumy = int(X_dumy/n)-1\n else:\n new = alpha[X_dumy%n]\n out = new+out\n X_dumy = int(X_dumy/n)\n return out\n\ndef main():\n n = int(input())\n x16_expr = Base_10_to_n(n, 26)\n print(x16_expr)\n\nif __name__ == "__main__":\n main()'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s829056471', 's925496953', 's710300686'] | [9188.0, 9212.0, 9224.0] | [31.0, 31.0, 34.0] | [399, 575, 564] |
p02629 | u362599643 | 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())\nsequence = list(map(lambda x: chr(x), range(ord(\'a\'), ord(\'z\') + 1)))\nprint(sequence)\n\ndef ten2TwentySix(num):\n L = []\n if num > 25:\n while True:\n d = int(num / 26)\n remainder = num % 26\n print(d,remainder)\n if d <= 25:\n L.insert(0, sequence[remainder])\n L.insert(0, sequence[d - 1])\n break\n else:\n L.insert(0, sequence[remainder])\n num = d - 1\n else:\n L.append(sequence[num])\n \n return "".join(L)\n \nprint(ten2TwentySix(n-1))\n', "N = int(input())\nalphabets = [chr(i) for i in range(ord('a'), ord('a') + 26)]\nans = ''\n\nwhile N > 0:\n N -= 1\n ans += alphabets[N % 26]\n N = N // 26\n\nprint(ans[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s651929690', 's148181708'] | [9208.0, 9176.0] | [35.0, 28.0] | [600, 174] |
p02629 | u363421241 | 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())\n\nal = [chr(ord('a') + i) for i in range(26)]\n\n\n\nans = []\nmod = 1\ncnt = 0\nwhile cnt >= 1:\n k = math.floor(n/26)\n ans.append(al[k % 26 - 1])\n\nprint(int(''.join(ans[::-1])))", "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])"] | ['Runtime Error', 'Accepted'] | ['s186248527', 's695076759'] | [8896.0, 9164.0] | [25.0, 28.0] | [205, 115] |
p02629 | u364555831 | 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\ndigit = 0\nmax = 0\nwhile True:\n if N <= max:\n break\n digit += 1\n max += 26 ** digit\nunder_digit = 0\n\nfor i in range(1, digit):\n under_digit += 26 ** i\n\norder = N - under_digit - 1 #0_index\n# print("order:", order)\n\nletter = [\'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\nremain = order\nnow = digit - 1\n\n\nans = ""\n# print(ans)\n# counter = 0\nif remain == 0:\n ans = "a" * digit\nwhile True:\n # print("---------------")\n # counter += 1\n # print("counter", counter)\n # if counter >= 10:\n # break\n\n ans = ans + letter[remain // (26 ** now)]\n remain %= 26 ** now\n now -= 1\n # print("ans:", ans, "remain:", remain, "now:", now)\n if remain == 0:\n ans += "a"\n break\n\nprint(ans)\n', 'N = int(input())\n\ndigit = 0\nmax = 0\nwhile True:\n if N <= max:\n break\n digit += 1\n max += 26 ** digit\nunder_digit = 0\n\nfor i in range(1, digit):\n under_digit += 26 ** i\n\norder = N - under_digit - 1 #0_index\n# print("order:", order)\n\nletter = [\'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\nremain = order\nnow = digit - 1\n\n\nans = ""\n# print(ans)\n# counter = 0\nif remain == 0:\n ans = "a" * digit\nwhile True:\n # print("---------------")\n # counter += 1\n # print("counter", counter)\n # if counter >= 10:\n # break\n\n ans = ans + letter[remain // (26 ** now)]\n remain %= 26 ** now\n now -= 1\n # print("ans:", ans, "remain:", remain, "now:", now)\n if remain == 0:\n ans = ans + "a"\n break\n\nprint(ans)\n', 'N = int(input())\nans = ""\nletter = "abcdefghijklmnopqrstuvwxyz"\n\nwhile N != 0:\n N -= 1\n ans = letter[N % 26] + ans\n N = N // 26\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s335238884', 's458617862', 's197387308'] | [9168.0, 9172.0, 9120.0] | [31.0, 30.0, 26.0] | [863, 868, 148] |
p02629 | u370061975 | 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>0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(name[::-1])", "N = int(input()) \nname='' \nwhile N>0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N = N // 26\nprint(name[::-1])", "N = int(input()) \nname='' \nwhile N>0:\n N -= 1\n ans += chr(ord('a') + N % 26)\n N //= 26\nprint(name[::-1])", "N=int(input())\nl = int(N**(1/26))\nname = ''\nwhile N >0:\n N -= 1\n r = N%26\n N = N//26\n name += chr(ord('a')+r)\nprint(name[::-1])"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s036569371', 's347307871', 's599871155', 's868290504'] | [9156.0, 9092.0, 8836.0, 9388.0] | [26.0, 26.0, 23.0, 28.0] | [113, 116, 113, 139] |
p02629 | u374671031 | 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 bisect import bisect_left, bisect_right\nN = int(input())\n\nMOJI = [26]\nfor i in range(2,12):\n MOJI.append(MOJI[i-2]+26**i)\n\nprint(MOJI)\n\nC = bisect_left(MOJI, N)+1\n\nif N in MOJI:\n print("z"*C)\n exit()\n\nans = []\nfor i in range(C-1,-1,-1):\n tmp = N//(26**i)\n ans.append(chr(tmp+ord("a")-1))\n N = N%(26**i)\n\nL=[str(a) for a in ans]\nL="".join(L)\nprint(L)', 'from bisect import bisect_left, bisect_right\nN = int(input())\n\nMOJI = [26]\nfor i in range(2,12):\n MOJI.append(MOJI[i-2]+26**i)\n\n#print(MOJI)\n\nC = bisect_left(MOJI, N)+1\n\nans = []\nfor i in range(0,C):\n tmp = N%26\n if tmp == 0:\n tmp = 26\n #print(tmp)\n ans.append(chr(tmp+ord("a")-1))\n N = (N-tmp)//26\n #print(N)\n\nans.reverse()\n\nL=[str(a) for a in ans]\nL="".join(L)\nprint(L)'] | ['Wrong Answer', 'Accepted'] | ['s265800531', 's994023346'] | [9144.0, 9208.0] | [31.0, 32.0] | [360, 381] |
p02629 | u375681664 | 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\nn=int(input())-1\nans=""\nc=[]\nif n==25:\n print("z")\n sys.exit()\nwhile True:\n if n>=25:\n c.append(n%26)\n n=n//26\n else:\n c.append(n)\n break\nfor i in range(len(c)):\n if i!=int(len(c))-1:\n ans+=chr(c[len(c)-i-1]+96)\n else: ans+=chr(c[len(c)-i-1]+97)\n\nprint(ans,n)\n\n', 'n=int(input())\ni=0\nb=""\nk=[]\n\nwhile True:\n k.append(chr(n%26+96))\n n=n//26\n if n<26:\n k.append(chr(n+96))\n break\n i+=1\nfor j in range(len(k)):\n b+=str(k[len(k)-j-1])\nprint(b)\n \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())\nprint(num2alpha(n))\n', 'def num2alpha(num):\n if num<=26:\n return chr(96+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(122)\n else:\n return num2alpha(num//26)+chr(96+num%26)\n\nn=int(input())\nprint(num2alpha(n))\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s306914773', 's748125908', 's859692417', 's833978632'] | [8860.0, 9176.0, 8996.0, 9132.0] | [33.0, 33.0, 33.0, 31.0] | [325, 209, 222, 223] |
p02629 | u376752722 | 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?" | ["num = int(input())\n\nnum2alpha = lambda c: chr(c+96)\nans = []\nnewans = []\nstring = ''\n\nwhile num > 0:\n if num % 26 == 0:\n ans.append(26)\n else:\n ans.append(num%26)\n if num < 27:\n break\n num = int(int(num) / 26)\n \nprint(ans)\n\nfor item in ans:\n newans.append(num2alpha(item))\n\nfor item in reversed(newans):\n string = string + item\n\nprint(string)\n\n\n\n", "num = int(input())\n\nnum2alpha = lambda c: chr(c+96)\nans = []\nnewans = []\nstring = ''\n\nwhile num > 0:\n if num % 26 == 0:\n ans.append(26)\n else:\n ans.append(num%26)\n if num < 27:\n break\n num = int((int(num) - 1) / 26)\n \n\nfor item in ans:\n newans.append(num2alpha(item))\n\nfor item in reversed(newans):\n string = string + item\n\nprint(string)\n\n\n\n"] | ['Wrong Answer', 'Accepted'] | ['s600181641', 's364828910'] | [9196.0, 9048.0] | [30.0, 33.0] | [389, 384] |
p02629 | u378153116 | 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(i) for i in range(97, 97+26)]\n\nout = ''\ntmp = n\nr = 1\nc = 0\ncount = 1\nwhile True:\n r *= 26\n # c += r\n print(c)\n if tmp > c+r:\n c += r\n count += 1\n else:\n break\n\ntmp = n - c - 1\nprint(tmp)\n# out = s[tmp%27-1]\n# tmp = int(tmp/27)\nwhile tmp>0:\n out = s[tmp%26]+out\n tmp = int(tmp/26)\n# out = s[tmp%26-1]+out\nfor _ in range(count-len(out)):\n out = 'a'+out\n\nprint(out)", "n = int(input())\ns = [chr(i) for i in range(97, 97+26)]\n\nout = ''\ntmp = n\nr = 1\nc = 0\ncount = 1\nwhile True:\n r *= 26\n # c += r\n # print(c)\n if tmp > c+r:\n c += r\n count += 1\n else:\n break\n\ntmp = n - c - 1\n# print(tmp)\n# out = s[tmp%27-1]\n# tmp = int(tmp/27)\nwhile tmp>0:\n out = s[tmp%26]+out\n tmp = int(tmp/26)\n# out = s[tmp%26-1]+out\nfor _ in range(count-len(out)):\n out = 'a'+out\n\nprint(out)"] | ['Wrong Answer', 'Accepted'] | ['s000937789', 's550711847'] | [9124.0, 9196.0] | [34.0, 28.0] | [434, 438] |
p02629 | u381585104 | 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 = ""\nal = "abcdefghijklmnopqrstuvwxyz"\n\nwhile n > 0:\n n -= 1\n x = n%26\n n /= 26\n s += al[int(x)]\n\nprint(s[::-1])\n \n', 'n = int(input())\ns = ""\nal = "zabcdefghijklmnopqrstuvwxyz"\n\nwhile n > 0:\n n -= 1\n x = n%26\n n /= 26\n s += al[int(x)]\n\nprint(s[::-1])\n ', 'n = int(input())\ns = ""\nal = "abcdefghijklmnopqrstuvwxyz"\n\nwhile n > 0:\n o = (n-1) % 26\n n = (n-1) // 26\n s += al[int(o)]\n\nprint(s[::-1])\n '] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s463398874', 's985656251', 's638816125'] | [9128.0, 9164.0, 9136.0] | [29.0, 30.0, 29.0] | [139, 139, 143] |
p02629 | u384793271 | 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())\nalp = 'abcdefghijklmnopqrstuvwxyz'\n\n\nmin_n = 0\nmax_n = 26\nl = 1\nwhile min_n < n <= max_n:\n min_n += max_n\n max_n += max_n * 26\n l += 1\n\n\nm = n - min_n - 1\nans = ''\nwhile m >= 26:\n ans = alp[m % 26] + ans\n m = m // 26 - 1\nans = alp[m] + ans\n\n\nwhile len(ans) < l:\n ans = 'a' + ans\n\nprint(ans)", "n = int(input())\nalp = 'abcdefghijklmnopqrstuvwxyz'\n\n\nmin_n = 0\nmax_n = 26\nl = 0\nwhile min_n < n <= max_n:\n min_n += max_n\n max_n += max_n * 26\n l += 1\n\n\nm = n - min_n - 1\nans = ''\nwhile m >= 26:\n ans = alp[m % 26] + ans\n m = m // 26 - 1\nans = alp[m] + ans\n\nwhile len(ans) < l:\n ans = 'a' + ans\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s774090496', 's074392722'] | [9124.0, 9128.0] | [29.0, 30.0] | [432, 431] |
p02629 | u389737182 | 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 = ''\n\nwhile True:\n mod = N % 26\n name = chr(mod + ord('a')) + name\n if N // 26 == 0:\n break\n else:\n N //= 26\n\nprint(name)", "N = int(input())\n\nname = ''\n\nwhile N:\n N -= 1\n mod = N % 26\n name = chr(mod + ord('a')) + name\n N //= 26\n\nprint(name)"] | ['Wrong Answer', 'Accepted'] | ['s111652984', 's313607392'] | [9100.0, 9100.0] | [29.0, 30.0] | [170, 129] |
p02629 | u392441504 | 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# mod = 10 % 3\n# print(q, mod)\nq =[]\nN = int(input())\nfor i in reversed(range(12)):\n q.append(N // (26**i) )\n N %= 26**i\n\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']\n\nans = alpha[q[0]]+alpha[q[1]]+alpha[q[2]]+alpha[q[3]] +alpha[q[4]] +alpha[q[5]]+alpha[q[6]] +alpha[q[7]] +alpha[q[8]] +alpha[q[9]] +alpha[q[10]] +alpha[q[11]]+alpha[12]\nprint(ans)", 'n = int(input())\nans = ""\nfor i in range(14):\n if n == 0:\n break\n else:\n n -= 1\n ans += chr(ord("a") + n % 26)\n n = n//26\n\nrslt = ans[::-1]\nprint(rslt)'] | ['Wrong Answer', 'Accepted'] | ['s947958541', 's832030642'] | [9184.0, 9108.0] | [28.0, 28.0] | [439, 185] |
p02629 | u394731058 | 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')+ans%26)\n 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'] | ['s941960721', 's977720304'] | [8968.0, 9160.0] | [26.0, 30.0] | [105, 104] |
p02629 | u395894569 | 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 = []\ns='abcdefghijklmnopqrstuvwxyz'\nwhile n > 0:\n print(n,n -1// 26, n -1% 26)\n l.append((n-1)%26)\n n = (n -1)// 26\nans = ''\nfor i in l[::-1]:\n ans += s[i]\nprint(ans)", "n=int(input())\nl = []\ns='abcdefghijklmnopqrstuvwxyz'\nwhile n > 0:\n l.append((n-1)%26)\n n = (n -1)// 26\nans = ''\nfor i in l[::-1]:\n ans += s[i]\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s963137718', 's299062624'] | [9176.0, 9200.0] | [31.0, 27.0] | [195, 162] |
p02629 | u396252065 | 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?" | ['name = ["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"]\nNUM = 26\nid = ""\nN = int(input())\n\nwhile True:\n q = N // NUM\n mod = N % NUM\n if mod == 0:\n id = name[NUM-1]+id\n else:\n id = name[mod-1]+id\n if q < 26:\n if mod == 0:\n id = name[q-2]+id\n else:\n id = name[q-1]+id\n break\n else:\n N = q\n \nprint(id)', 'name = ["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"]\nNUM = 26\nid = ""\nN = int(input())\n\nwhile True:\n q = N // NUM\n mod = N % NUM\n if mod == 0:\n q = q-1\n mod = 26\n else:\n None\n\n id = name[mod-1]+id\n if q <= 0:\n break\n \n if q <= 26 and q > 0:\n id = name[q-1]+id\n break\n else:\n N = q\n \nprint(id)'] | ['Wrong Answer', 'Accepted'] | ['s038584278', 's774762605'] | [9168.0, 9160.0] | [29.0, 30.0] | [392, 383] |
p02629 | u401686269 | 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\npow = 1\nwhile True:\n if N <= 26**pow:\n break\n pow += 1\n\nn = N - 26**(pow-1)\ns = []\nfor i in range(pow-1, -1, -1):\n print(i)\n q = n // (26**i)\n s.append(q)\n n = n % (26**i) \n\nname = ''\nfor i in range(len(s)):\n if i == 0:\n name = name + 'abcdefghijklmnopqrstuvwxyz'[s[i]]\n else:\n name = name + 'abcdefghijklmnopqrstuvwxyz'[s[i]-1]\n\nprint(name)", "N = int(input())\n\ns = []\nn = N\nwhile True:\n mod = n % 26\n s.append(mod)\n if n // 26 == 0:\n break\n n = (n - mod) // 26\n\nfor i in range(len(s)):\n if s[i] == 0 and i != len(s)-1:\n s[i] = 26\n s[i+1] = s[i+1] - 1\n if s[i] == -1:\n s[i] = 25\n s[i+1] = s[i+1] - 1\n\nif s[-1] == 0:\n s = s[:-1]\n\nname = ''\nfor i in range(len(s)):\n name = 'abcdefghijklmnopqrstuvwxyz'[s[i]-1] + name\n\nprint(name)"] | ['Wrong Answer', 'Accepted'] | ['s454077712', 's080328350'] | [9200.0, 9160.0] | [30.0, 33.0] | [396, 442] |
p02629 | u404639509 | 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=[chr(ord('a') + i) for i in range(26)]\nsakai=[]\nk=0\nfor i in range(10):\n k+=26**(i+1)\n sakai.append(k)\n\n\nfor i in range(10):\n if (sakai[i]<n<=sakai[i+1]):\n n-=sakai[i]\n u=i+2\n elif (n>sakai[9]):\n n-=sakai[9]\n u=12\n\ndef base(n):\n ans=[]\n while(n>26):\n r=n%26\n n=(n-r)//26\n ans.append(r)\n ans.append(n)\n return ans\n\np=base(n-1)\nif u-len(p)>0:\n ans_3='a'\n if u-len(p)>1:\n for j in range(u-len(p)-1):\n ans_3+='a'\n \nfor i in range(len(p)):\n if i==0:\n ans_2=al[p[len(p)-i-1]]\n else:\n ans_2=ans_2+al[p[len(p)-i-1]]\nif u-len(p)>0:\n print(ans_3+ans_2)\nelse:\n print(ans_2)\n \n ", "n=int(input())\nal=[chr(ord('a') + i) for i in range(26)]\nsakai=[]\nk=0\nfor i in range(10):\n k+=26**(i+1)\n sakai.append(k)\n\nif n<=26:\n n-=1\n u=1\nelif n>sakai[9]:\n n-=sakai[9]+1\n u=11\nfor i in range(9):\n if (sakai[i]<n<=sakai[i+1]):\n n-=sakai[i]+1\n u=i+2\n\ndef base(n):\n ans=[]\n while(n>=26):\n r=n%26\n n=(n-r)//26\n ans.append(r)\n ans.append(n)\n return ans\n\n\np=base(n)\n\nif u-len(p)>0:\n ans_3='a'\n if u-len(p)>1:\n for j in range(u-len(p)-1):\n ans_3+='a'\n \nfor i in range(len(p)):\n if i==0:\n ans_2=al[p[len(p)-i-1]]\n else:\n ans_2=ans_2+al[p[len(p)-i-1]]\nif u-len(p)>0:\n print(ans_3+ans_2)\nelse:\n print(ans_2)"] | ['Runtime Error', 'Accepted'] | ['s814039805', 's115847091'] | [9276.0, 9148.0] | [30.0, 34.0] | [653, 650] |
p02629 | u407702479 | 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\nans=""\nfor i in range(1,9):\n if 26**i >= N:\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', 'N=int(input())\nnum=0\nans=""\nfor i in range(1,9):\n if 26**i > N:\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', 'N=int(input())\nnum=0\nans=""\nfor i in range(1,9):\n if 26**i > N:\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', 'N=int(input())\nnum=0\nans=""\nfor i in range(1,99):\n if 26**i >= N:\n N-=1\n for j in range(i):\n ans+=chr(97+N%26)\n N//=26\n break\n else:\n N-=26**i\nprint(ans[::-1])\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s073362474', 's129733146', 's242778396', 's101072411'] | [9020.0, 8992.0, 9104.0, 9120.0] | [25.0, 27.0, 29.0, 26.0] | [203, 215, 202, 216] |
p02629 | u409371339 | 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())\nlist= ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q",\n "r","s","t","u","v","w","x","y","z","","","","","",""]\ndata=[]\nans = str()\nr = int()\n\nwhile n > 0:\n r = n % 26\n data.append(r)\n n //= 26\n \nprint(data)\n\nis_z =False \nfor i in reversed(data):\n if i == 0:\n ans = ans.replace("a","z")\n ans += list[i - 1]\n \nprint(ans)', "n = int(input())\ndata = ''\n\nwhile n > 0:\n n -= 1\n r = n % 26\n data += chr(r + ord('a'))\n n //= 26\n\nprint(data[::-1])"] | ['Wrong Answer', 'Accepted'] | ['s049249563', 's551759898'] | [9208.0, 9100.0] | [29.0, 30.0] | [391, 128] |
p02629 | u416011173 | 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 -*-\nfrom numba import njit, void, i8\n\n\ndef get_input() -> int:\n \n N = int(input())\n\n return N\n\n\n@njit(void(i8))\ndef main(N: int) -> None:\n \n \n ans = ""\n while N > 0:\n N -= 1\n ans += chr(ord("a") + N % 26)\n N //= 26\n ans = ans[::-1]\n\n \n print(ans)\n\n\nif __name__ == "__main__":\n N = get_input()\n main(N)\n', '# -*- coding: utf-8 -*-\n\n\ndef get_input() -> int:\n \n N = int(input())\n\n return N\n\n\ndef main(N: int) -> None:\n \n \n ans = ""\n while N > 0:\n N -= 1\n ans += chr(ord("a") + N % 26)\n N //= 26\n ans = ans[::-1]\n\n \n print(ans)\n\n\nif __name__ == "__main__":\n N = get_input()\n main(N)\n'] | ['Runtime Error', 'Accepted'] | ['s063087830', 's709851662'] | [106604.0, 9088.0] | [499.0, 27.0] | [559, 510] |
p02629 | u430937688 | 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?" | ["bounds = [sum([26 ** i for i in range(n)]) for n in range(1, 11)]\nN = int(input())\nfor b in reversed(bounds):\n if b <= N:\n break\nN -= b \nlength = bounds.index(b) + 1\ns = ''\nfor i in range(length - 1, 0, -1):\n idx, N = divmod(N, 26**i)\n s = s + lis[idx]\nprint(s + lis[N])", "bounds = [sum([26 ** i for i in range(n)]) for n in range(1, 12)]\nlis = 'abcdefghijklmnopqrstuvwxyz'\nN = int(input())\nfor b in reversed(bounds):\n if b <= N:\n break\nN -= b \nlength = bounds.index(b) + 1\ns = ''\nfor i in range(length - 1, 0, -1):\n idx, N = divmod(N, 26**i)\n s = s + lis[idx]\nprint(s + lis[N])"] | ['Runtime Error', 'Accepted'] | ['s970706285', 's247433412'] | [9204.0, 9208.0] | [25.0, 31.0] | [286, 321] |
p02629 | u440613652 | 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=''\nwhile n:\n n-=1\n s=chr(65+n%26)+s\n n//=26\n \nprint(s)", "n=int(input())\ns=''\nwhile n:\n n-=1\n s=chr(97+total%26)+s\n n//=26\n\nprint(s)", "n=int(input())\ns=''\nwhile n:\n n-=1\n s=chr(97+n%26)+s\n n//=26\n\nprint(s)"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s057541888', 's663406513', 's933831877'] | [9148.0, 9184.0, 9148.0] | [30.0, 29.0, 33.0] | [76, 83, 79] |
p02629 | u440975163 | 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 B(X, n):\n X_dumy = X\n ln = []\n while X_dumy>0:\n ln.append(int(X_dumy%n))\n X_dumy = int(X_dumy/n)\n ln.reverse()\n return ln\nln = B(n, 26)\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']\nq = []\nprint(ln)\nfor i in range(len(ln)):\n if ln[i] == 1 and ln[i] < ln.index(0):\n q.append('z')\n elif ln[i] != 0:\n q.append(a[ln[i] - 1])\nprint(''.join(q))", "n = int(input())\ndef B(X, n):\n X_dumy = X\n ln = []\n while X_dumy>0:\n ln.append(int(X_dumy%n))\n X_dumy = int(X_dumy/n)\n return ln\nln = B(n, 26)\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']\nq = []\nfor i in range(len(ln)):\n if ln[i] > 0:\n q.append(a[ln[i] - 1])\n elif ln[i] == 0:\n if i != len(ln) - 1:\n ln[i + 1] -= 1\n q.append('z')\n elif ln[i] < 0:\n q.append('y')\n ln[i + 1] -= 1\n \nq.reverse()\nprint(''.join(q))"] | ['Runtime Error', 'Accepted'] | ['s518450804', 's495705353'] | [9260.0, 9192.0] | [28.0, 34.0] | [497, 591] |
p02629 | u447679353 | 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 = 27\nans = ""\ndef n(N):\n ans= ""\n for i in range(N):\n if N%26 ==0:\n ans = "z" +ans\n N -= 1\n else:\n ans = chr(64+ N%26) +ans\n \n if N <= 26:\n break\n N = N // 26\n return ans\n \nfor i in range(1,10000):\n print(n(i))\nprint(ans.lower())', 'N=int(input())\nN = 1000000000000001\nans = ""\nfor i in range(N):\n if N%26 == 0:\n ans = "z" + ans\n else:\n ans = chr(64 + N%26) + ans\n N = N // 26\n if N==0:\n break\n \n \nprint(ans.lower())', 'N=int(input())\n\nans = ""\ndef n(N):\n ans= ""\n for i in range(N):\n if N%26 ==0:\n ans = "z" +ans\n N -= 1\n else:\n ans = chr(64+ N%26) +ans\n \n if N <= 26:\n break\n N = N // 26\n return ans\n \n\nprint(n(N).lower())'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s024153237', 's061768455', 's016945086'] | [9260.0, 9092.0, 9160.0] | [44.0, 28.0, 29.0] | [340, 226, 295] |
p02629 | u450478592 | 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())\nresult = ""\nitr = 0\nfor n in range (27, 703):\n itr = n\n while True:\n alpha = int(n % 26)\n if alpha == 0:\n result += "z"\n n -= 1\n else:\n result += chr(alpha + 96)\n if n/26 < 1:\n break\n n /= 26\n\n rslt = result[::-1]\n print(str(rslt) + ": " + str(itr))\n result = ""\n\n', 'n = int(input())\nresult = ""\n\nwhile True:\n alpha = int(n % 26)\n if alpha == 0:\n result += "z"\n n -= 1\n else:\n result += chr(alpha + 96)\n if n/26 < 1:\n break\n n /= 26\nrslt = result[::-1]\nprint(rslt)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s212311174', 's698090572'] | [9120.0, 9076.0] | [32.0, 28.0] | [367, 233] |
p02629 | u455408345 | 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(""))\na=[]\nfor i in range(11):\n a+=[n%26]\n n=int(n/26)\nb=[]\nfor i in range(len(a)):\n b+=[a[len(a)-i-1]]\n\ns=""\nfor i in b:\n if (i==1):\n s+="a"\n elif(i==2):\n s+="b"\n elif(i==3):\n s+="c"\n elif(i==4):\n s+="d"\n elif(i==5):\n s+="e"\n elif(i==6):\n s+="f"\n elif(i==7):\n s+="g"\n elif(i==8):\n s+="h"\n elif(i==9):\n s+="i"\n elif(i==10):\n s+="j"\n elif(i==11):\n s+="k"\n elif(i==12):\n s+="l"\n elif(i==13):\n s+="m"\n elif(i==14):\n s+="n"\n elif(i==15):\n s+="o"\n elif(i==16):\n s+="p"\n elif(i==17):\n s+="q"\n elif(i==18):\n s+="r"\n elif(i==19):\n s+="s"\n elif(i==20):\n s+="t"\n elif(i==21):\n s+="u"\n elif(i==22):\n s+="v"\n elif(i==23):\n s+="w"\n elif(i==24):\n s+="x"\n elif(i==25):\n s+="y"\n elif(i==0):\n s+="z"\nprint(s)\n \n \n', 'n=int(input(""))\na=[]\nt=0\nc=0\nfor i in range(11):\n t=n\n c=i+1\n n-=26**(i+1)\n if(n<=0):\n break\nfor i in range(c):\n a+=[n%26]\n n=int(n/26)\nb=[]\nfor i in range(c):\n b+=[a[n-1-i]]\ns=""\nfor i in b:\n if (i==1):\n s+="a"\n elif(i==2):\n s+="b"\n elif(i==3):\n s+="c"\n elif(i==4):\n s+="d"\n elif(i==5):\n s+="e"\n elif(i==6):\n s+="f"\n elif(i==7):\n s+="g"\n elif(i==8):\n s+="h"\n elif(i==9):\n s+="i"\n elif(i==10):\n s+="j"\n elif(i==11):\n s+="k"\n elif(i==12):\n s+="l"\n elif(i==13):\n s+="m"\n elif(i==14):\n s+="n"\n elif(i==15):\n s+="o"\n elif(i==16):\n s+="p"\n elif(i==17):\n s+="q"\n elif(i==18):\n s+="r"\n elif(i==19):\n s+="s"\n elif(i==20):\n s+="t"\n elif(i==21):\n s+="u"\n elif(i==22):\n s+="v"\n elif(i==23):\n s+="w"\n elif(i==24):\n s+="x"\n elif(i==25):\n s+="y"\n elif(i==0):\n s+="z"\n\nprint(s)\n \n \n'] | ['Wrong Answer', 'Accepted'] | ['s494165897', 's475894928'] | [9108.0, 9268.0] | [31.0, 28.0] | [992, 1062] |
p02629 | u456173883 | 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\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)\nx = num2alpha(n)\nprint(x.upper())', "n = int(input())\nalphabets = ''.join(chr(ord('a') + i) for i in range(26))\nbase = len(alphabets)\n\ndef number_to_alphabets(n, l=10):\n a = ''\n for _ in range(l):\n d = n % base\n a = alphabets[d] + a\n return a\n\nprint(number_to_alphabets(n)) ", 'n = int(input())\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)\nx = num2alpha(n)\nprint(x.lower())'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s470293702', 's926143423', 's562286564'] | [9088.0, 9172.0, 9180.0] | [29.0, 29.0, 32.0] | [237, 267, 237] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.