結果
| 問題 |
No.600 かい文回
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-26 10:09:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 738 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2024-07-05 15:35:08 |
| 合計ジャッジ時間 | 1,866 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
import sys
input = lambda : sys.stdin.readline().rstrip()
write = lambda x: sys.stdout.write(x+"\n")
debug = lambda x: sys.stderr.write(x+"\n")
writef = lambda x: print("{:.12f}".format(x))
n = int(input())
def main(n):
n0 = n
ll = []
while n>2:
ll.append(n%2)
if n%2:
n -= 1
else:
n = (n-2)//2
c = 0
ans = [c]
l = []
for item in ll[::-1]:
c += 1
c %= 26
if not item:
l.extend([c,c])
else:
l.extend([c])
l = l[::-1]
if n==1:
ans = [0]
else:
ans = [0,0]
ans = l + ans + l[::-1]
ans = "".join(map(lambda c: chr(c+ord("a")), ans))
return ans
ans = main(n)
print(ans)