結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2017-12-06 10:04:00 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 26 ms / 5,000 ms |
コード長 | 598 bytes |
コンパイル時間 | 2,450 ms |
コンパイル使用メモリ | 107,104 KB |
実行使用メモリ | 27,440 KB |
最終ジャッジ日時 | 2024-07-07 06:40:49 |
合計ジャッジ時間 | 2,857 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
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);}}