結果
問題 | No.18 うーさー暗号 |
ユーザー | yutakahan |
提出日時 | 2017-12-06 10:04:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 49 ms / 5,000 ms |
コード長 | 598 bytes |
コンパイル時間 | 2,205 ms |
コンパイル使用メモリ | 101,756 KB |
実行使用メモリ | 22,688 KB |
最終ジャッジ日時 | 2023-09-21 12:55:18 |
合計ジャッジ時間 | 3,574 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 47 ms
22,488 KB |
testcase_01 | AC | 46 ms
20,476 KB |
testcase_02 | AC | 46 ms
20,528 KB |
testcase_03 | AC | 49 ms
22,688 KB |
testcase_04 | AC | 47 ms
22,572 KB |
testcase_05 | AC | 47 ms
20,456 KB |
testcase_06 | AC | 48 ms
20,496 KB |
testcase_07 | AC | 47 ms
20,624 KB |
testcase_08 | AC | 48 ms
20,500 KB |
testcase_09 | AC | 48 ms
20,464 KB |
testcase_10 | AC | 46 ms
22,440 KB |
testcase_11 | AC | 47 ms
22,580 KB |
testcase_12 | AC | 48 ms
18,404 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; public class Hello{ static string Decode(string input){ string sample = "ZYXWVUTSRQPONMLKJIHGFEDCBA"; string ans = ""; for(int x = 0;x < input.Length;x++){ for(int y = 0;y < sample.Length;y++){ if(input.Substring(x,1) == sample.Substring(y,1)){ ans += sample.Substring((y + x + 1) % 26,1); } } } return ans; } public static void Main(){ string X = Console.ReadLine(); string Ans = Decode(X); Console.WriteLine(Ans); } }