結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2016-11-02 05:35:10 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 655 bytes |
| コンパイル時間 | 1,855 ms |
| コンパイル使用メモリ | 110,948 KB |
| 実行使用メモリ | 28,760 KB |
| 最終ジャッジ日時 | 2024-07-07 06:21:32 |
| 合計ジャッジ時間 | 1,569 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Magatro
{
static Dictionary<char, int> D = new Dictionary<char, int>();
static void Main()
{
string s = Console.ReadLine();
string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char[] C = ABC.ToArray();
for (int i = 0; i < 26; i++)
{
D.Add(ABC[i], i);
}
int lng = s.Length;
for(int i = 0; i < lng; i++)
{
int r = (1300 - i-1 + D[s[i]]) % 26;
Console.Write(C[r]);
}
Console.WriteLine();
}
}
mban