結果

問題 No.18 うーさー暗号
ユーザー R NR N
提出日時 2020-07-29 08:29:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 395 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 9,132 KB
最終ジャッジ日時 2023-09-11 07:09:14
合計ジャッジ時間 1,499 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
8,980 KB
testcase_01 AC 26 ms
8,976 KB
testcase_02 AC 27 ms
8,960 KB
testcase_03 AC 28 ms
9,076 KB
testcase_04 AC 27 ms
8,984 KB
testcase_05 AC 26 ms
8,980 KB
testcase_06 AC 27 ms
8,968 KB
testcase_07 AC 27 ms
8,968 KB
testcase_08 AC 28 ms
9,080 KB
testcase_09 AC 28 ms
8,984 KB
testcase_10 AC 25 ms
8,976 KB
testcase_11 AC 26 ms
9,132 KB
testcase_12 AC 27 ms
8,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8

import string

s = str(input())
s_i = 0
A =string.ascii_uppercase
array_A = [i for i in A]
num = [int(i+1) for i in range(len(array_A))]
ans = []
for j in range(len(s)):
    s_i += 1
    a_i = array_A.index(s[j])
    if s_i == len(array_A):
        s_i = 0
        ans.append(array_A[a_i-s_i])
    else:
        ans.append(array_A[a_i-s_i])

for a in ans:
    print(*a , end="")
0