結果
問題 | No.1455 拡張ROTN |
ユーザー |
👑 |
提出日時 | 2021-05-25 14:13:13 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 860 bytes |
コンパイル時間 | 56 ms |
コンパイル使用メモリ | 6,820 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 00:05:07 |
合計ジャッジ時間 | 1,125 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
local ffi = require("ffi")local C = ffi.Cffi.cdef[[long long atoll(const char*);]]local function lltonumber(str)return C.atoll(str)endlocal s = io.read()local n = io.read()n = lltonumber(n)local t = {}local function f()for i = 1, #s dolocal ss = s:byte(i)if 48 <= ss and ss <= 56 thent[i] = string.char(ss + 1)elseif ss == 57 thent[i] = "CpCzNkSuTbEoA"elseif 65 <= ss and ss <= 89 thent[i] = string.char(ss + 1)elseif ss == 90 thent[i] = "A"elseif 97 <= ss and ss <= 121 thent[i] = string.char(ss + 1)elseif ss == 122 thent[i] = "a"endends = table.concat(t)endif n <= 10LL thenwhile 0LL < n dof()n = n - 1LLendelsefor i = 1, 10 dof()endn = (n - 10LL) % 26LLwhile 0LL < n dof()n = n - 1endendprint(s)