結果

問題 No.163 cAPSlOCK
ユーザー ProgramingWeProgramingWe
提出日時 2017-10-27 15:59:58
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 46 ms / 5,000 ms
コード長 659 bytes
コンパイル時間 3,112 ms
コンパイル使用メモリ 99,160 KB
実行使用メモリ 22,592 KB
最終ジャッジ日時 2023-08-14 02:53:13
合計ジャッジ時間 3,680 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
20,472 KB
testcase_01 AC 42 ms
20,412 KB
testcase_02 AC 42 ms
20,444 KB
testcase_03 AC 42 ms
20,524 KB
testcase_04 AC 44 ms
22,436 KB
testcase_05 AC 43 ms
20,452 KB
testcase_06 AC 41 ms
20,424 KB
testcase_07 AC 46 ms
22,512 KB
testcase_08 AC 41 ms
22,540 KB
testcase_09 AC 42 ms
20,560 KB
testcase_10 AC 42 ms
20,412 KB
testcase_11 AC 41 ms
20,400 KB
testcase_12 AC 42 ms
18,408 KB
testcase_13 AC 46 ms
22,592 KB
testcase_14 AC 43 ms
22,460 KB
testcase_15 AC 41 ms
20,484 KB
testcase_16 AC 42 ms
22,488 KB
testcase_17 AC 42 ms
20,432 KB
testcase_18 AC 42 ms
22,444 KB
testcase_19 AC 42 ms
18,476 KB
testcase_20 AC 41 ms
20,460 KB
testcase_21 AC 42 ms
22,528 KB
testcase_22 AC 43 ms
20,492 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] cs = Console.ReadLine().ToCharArray();
            for (int i = 0; i < cs.Length; i++)
            {
                if (char.IsUpper(cs[i]))
                {
                    cs[i] = char.ToLower(cs[i]);
                }
                else if (char.IsLower(cs[i]))
                {
                    cs[i] = char.ToUpper(cs[i]);
                }
            }
            string s2 = new string(cs);
            Console.WriteLine(s2);

        }
    }
}
0