結果
問題 | No.18 うーさー暗号 |
ユーザー | supepepe |
提出日時 | 2019-01-25 15:03:33 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 16 ms / 5,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 10,704 KB |
実行使用メモリ | 7,912 KB |
最終ジャッジ日時 | 2023-10-14 09:50:27 |
合計ジャッジ時間 | 987 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,848 KB |
testcase_01 | AC | 16 ms
7,884 KB |
testcase_02 | AC | 15 ms
7,804 KB |
testcase_03 | AC | 16 ms
7,884 KB |
testcase_04 | AC | 15 ms
7,800 KB |
testcase_05 | AC | 16 ms
7,740 KB |
testcase_06 | AC | 15 ms
7,912 KB |
testcase_07 | AC | 16 ms
7,848 KB |
testcase_08 | AC | 16 ms
7,836 KB |
testcase_09 | AC | 16 ms
7,740 KB |
testcase_10 | AC | 16 ms
7,848 KB |
testcase_11 | AC | 15 ms
7,852 KB |
testcase_12 | AC | 16 ms
7,804 KB |
ソースコード
# -*- coding: utf-8 -*- alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] mojiretsu = list(input()) count = int(len(mojiretsu)) decode_mojiretsu = "" counter = 0 for i in range (count): moji = mojiretsu[i] decode_1 = alphabet.index(moji) counter += 1 if counter < 26: decode_mojiretsu += alphabet[decode_1 - counter] else: counter = 0 decode_mojiretsu += alphabet[decode_1 - counter] print (decode_mojiretsu)