結果

問題 No.163 cAPSlOCK
ユーザー yagi2yagi2
提出日時 2017-04-14 01:11:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 481 bytes
コンパイル時間 1,867 ms
コンパイル使用メモリ 74,436 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2024-07-18 13:01:35
合計ジャッジ時間 5,449 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
52,976 KB
testcase_01 AC 121 ms
53,908 KB
testcase_02 AC 117 ms
54,016 KB
testcase_03 AC 134 ms
54,404 KB
testcase_04 AC 124 ms
53,944 KB
testcase_05 AC 122 ms
54,184 KB
testcase_06 AC 116 ms
53,880 KB
testcase_07 AC 120 ms
54,056 KB
testcase_08 AC 136 ms
53,972 KB
testcase_09 AC 113 ms
52,656 KB
testcase_10 AC 119 ms
54,052 KB
testcase_11 AC 105 ms
52,844 KB
testcase_12 AC 111 ms
53,012 KB
testcase_13 AC 125 ms
54,076 KB
testcase_14 AC 124 ms
54,068 KB
testcase_15 AC 125 ms
54,092 KB
testcase_16 AC 136 ms
53,968 KB
testcase_17 AC 103 ms
52,380 KB
testcase_18 AC 119 ms
53,976 KB
testcase_19 AC 121 ms
54,100 KB
testcase_20 AC 119 ms
54,036 KB
testcase_21 AC 99 ms
52,896 KB
testcase_22 AC 132 ms
54,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        String[] sp = S.split("");

        for (String aSp : sp) {
            if (Character.isUpperCase(aSp.charAt(0))) {
                System.out.print(aSp.toLowerCase());
            } else {
                System.out.print(aSp.toUpperCase());
            }
        }
        System.out.println();
    }
}
0