結果

問題 No.18 うーさー暗号
ユーザー warashiwarashi
提出日時 2015-05-28 20:42:39
言語 Go
(1.22.1)
結果
RE  
実行時間 -
コード長 346 bytes
コンパイル時間 12,040 ms
コンパイル使用メモリ 225,368 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 02:09:10
合計ジャッジ時間 12,713 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
	"strings"
)

func main() {
	var alp, S string
	alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	fmt.Scan(&S)
	T := make([]string, 0, 1024)
	for i, s := range S {
		i++
		a := strings.IndexRune(alp, s)
		a -= i
		for i < 0 {
			i += 26
		}
		T = append(T, string(alp[a]))
	}
	woosaa := strings.Join(T, "")
	fmt.Println(woosaa)
}
0