結果

問題 No.163 cAPSlOCK
ユーザー p_nixp_nix
提出日時 2018-01-23 20:29:45
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 558 bytes
コンパイル時間 1,977 ms
コンパイル使用メモリ 99,960 KB
実行使用メモリ 22,640 KB
最終ジャッジ日時 2023-08-26 23:53:07
合計ジャッジ時間 4,157 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
22,464 KB
testcase_01 AC 50 ms
20,496 KB
testcase_02 AC 49 ms
20,428 KB
testcase_03 AC 50 ms
18,488 KB
testcase_04 AC 49 ms
22,464 KB
testcase_05 AC 50 ms
22,456 KB
testcase_06 AC 49 ms
20,404 KB
testcase_07 AC 49 ms
20,436 KB
testcase_08 AC 48 ms
20,464 KB
testcase_09 AC 49 ms
18,352 KB
testcase_10 AC 50 ms
20,484 KB
testcase_11 AC 50 ms
20,428 KB
testcase_12 AC 50 ms
20,492 KB
testcase_13 AC 50 ms
20,504 KB
testcase_14 AC 50 ms
22,640 KB
testcase_15 AC 49 ms
22,512 KB
testcase_16 AC 50 ms
20,420 KB
testcase_17 AC 49 ms
20,444 KB
testcase_18 AC 50 ms
20,416 KB
testcase_19 AC 50 ms
22,472 KB
testcase_20 AC 50 ms
20,408 KB
testcase_21 AC 50 ms
22,448 KB
testcase_22 AC 51 ms
22,536 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace prob163
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = "";
            foreach (var item in a)
            {
                if (item.ToString().ToUpper() == item.ToString())
                {
                    b += item.ToString().ToLower();
                }
                else
                {
                    b += item.ToString().ToUpper();
                }
            }
            Console.WriteLine(b);
        }
    }
}
0