結果
問題 | No.18 うーさー暗号 |
ユーザー | Himatsubushin |
提出日時 | 2019-01-09 13:59:04 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 51 ms / 5,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 2,114 ms |
コンパイル使用メモリ | 102,656 KB |
実行使用メモリ | 22,680 KB |
最終ジャッジ日時 | 2023-08-15 16:53:21 |
合計ジャッジ時間 | 4,068 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 48 ms
20,608 KB |
testcase_01 | AC | 48 ms
20,600 KB |
testcase_02 | AC | 49 ms
20,644 KB |
testcase_03 | AC | 51 ms
22,680 KB |
testcase_04 | AC | 49 ms
20,520 KB |
testcase_05 | AC | 49 ms
20,428 KB |
testcase_06 | AC | 50 ms
20,556 KB |
testcase_07 | AC | 51 ms
20,388 KB |
testcase_08 | AC | 50 ms
20,504 KB |
testcase_09 | AC | 50 ms
20,488 KB |
testcase_10 | AC | 48 ms
20,544 KB |
testcase_11 | AC | 49 ms
22,500 KB |
testcase_12 | AC | 50 ms
22,508 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace No018 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); for (int i = 0; i < s.Length; i++) { Console.Write(Uusa(s[i], i % 26)); } } static char Uusa(char c, int n) { int a = c - (char)n - 1; if (a < 'A') a = 'Z' - ('A' - a) + 1; return (char)a; } } }