結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-31 10:35:06 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 78 ms / 5,000 ms |
| コード長 | 606 bytes |
| コンパイル時間 | 20,142 ms |
| コンパイル使用メモリ | 169,036 KB |
| 実行使用メモリ | 27,016 KB |
| 最終ジャッジ日時 | 2025-10-31 10:35:36 |
| 合計ジャッジ時間 | 9,656 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (158 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program
{
static void Main(string[] args)
{
string inputWord = Console.ReadLine()!;
int count = 0;
foreach (char c in inputWord)
{
count++;
char newWord = c;
if (count >= 26)
{
count = 0;
}
int index = newWord - count;
if (index <= 64)
{
int num = 64 - index;
index = 90 - num;
}
newWord = (char) (index);
Console.Write(newWord);
}
Console.WriteLine();
}
}