結果

問題 No.18 うーさー暗号
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-03 21:34:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 23 ms / 5,000 ms
コード長 306 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 10,504 KB
実行使用メモリ 8,632 KB
最終ジャッジ日時 2023-09-21 12:09:00
合計ジャッジ時間 1,214 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,612 KB
testcase_01 AC 18 ms
8,500 KB
testcase_02 AC 19 ms
8,464 KB
testcase_03 AC 23 ms
8,588 KB
testcase_04 AC 19 ms
8,548 KB
testcase_05 AC 19 ms
8,604 KB
testcase_06 AC 20 ms
8,504 KB
testcase_07 AC 21 ms
8,480 KB
testcase_08 AC 22 ms
8,536 KB
testcase_09 AC 20 ms
8,476 KB
testcase_10 AC 18 ms
8,632 KB
testcase_11 AC 18 ms
8,600 KB
testcase_12 AC 20 ms
8,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
from math import pi
from collections import deque
from functools import reduce

### defs ###

### main ###
S = sys.stdin.readline().strip('\r\n')
ans = ''
for i in range(len(S)):
	x = ord(S[i])-i-1
	if (x < ord('A')):
		while (x < ord('A')):
			x += 26
	ans += chr(x)
print(ans)
0