結果

問題 No.18 うーさー暗号
ユーザー Shunya SeiyaShunya Seiya
提出日時 2017-03-01 01:02:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 587 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 6,660 KB
実行使用メモリ 5,996 KB
最終ジャッジ日時 2023-09-21 12:37:51
合計ジャッジ時間 924 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,912 KB
testcase_01 AC 11 ms
5,916 KB
testcase_02 AC 11 ms
5,936 KB
testcase_03 AC 12 ms
5,920 KB
testcase_04 AC 11 ms
5,996 KB
testcase_05 AC 10 ms
5,852 KB
testcase_06 AC 11 ms
5,976 KB
testcase_07 AC 11 ms
5,952 KB
testcase_08 AC 11 ms
5,948 KB
testcase_09 AC 11 ms
5,836 KB
testcase_10 AC 10 ms
5,848 KB
testcase_11 AC 11 ms
5,944 KB
testcase_12 AC 11 ms
5,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# 標準入力から一行分を読み出し、文字列として格納する。
input_string = raw_input()

# 読み込んだ文字列をスペースで分割する。
# split_first = first.split()

# それぞれをint型に変換する。
#A = int(split_first[0])
#B = int(split_first[1])

output_string = ""
i = 1
for string in input_string:
	nextstr = ord(string)-i%26
	if (nextstr<65):
		nextstr = nextstr + 26
	elif (nextstr>90):
		nextstr = nextstr - 26

	output_string = output_string + chr(nextstr)
	i = i+1


print output_string
0