結果

問題 No.18 うーさー暗号
ユーザー chankou0920chankou0920
提出日時 2017-10-02 20:37:22
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 3,077 ms
コンパイル使用メモリ 97,504 KB
実行使用メモリ 22,520 KB
最終ジャッジ日時 2023-09-21 12:50:54
合計ジャッジ時間 4,440 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
20,372 KB
testcase_01 AC 47 ms
20,468 KB
testcase_02 AC 47 ms
20,432 KB
testcase_03 AC 47 ms
20,436 KB
testcase_04 AC 47 ms
20,548 KB
testcase_05 AC 48 ms
20,500 KB
testcase_06 AC 48 ms
20,436 KB
testcase_07 AC 49 ms
20,488 KB
testcase_08 AC 48 ms
22,484 KB
testcase_09 AC 48 ms
22,520 KB
testcase_10 AC 48 ms
20,440 KB
testcase_11 AC 48 ms
20,484 KB
testcase_12 AC 48 ms
20,608 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
	public static void Main(string[] args) {
		char[] c = Console.ReadLine().ToCharArray();
		string s = "";
		for (int i = 0; i < c.Length; i++) {
			int code = (int)c[i] - i % 26 - 1;
			if (code < 65) {
				code = 90 - 64 + code;
			}
			s += (char)code;
		}
		Console.WriteLine(s);
	}
}
0