結果

問題 No.163 cAPSlOCK
ユーザー yagi2yagi2
提出日時 2017-04-14 01:11:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 481 bytes
コンパイル時間 1,912 ms
コンパイル使用メモリ 71,340 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-09-25 16:33:17
合計ジャッジ時間 6,427 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,164 KB
testcase_01 AC 122 ms
55,576 KB
testcase_02 AC 125 ms
55,932 KB
testcase_03 AC 131 ms
56,060 KB
testcase_04 AC 132 ms
55,708 KB
testcase_05 AC 123 ms
55,664 KB
testcase_06 AC 120 ms
53,748 KB
testcase_07 AC 131 ms
55,644 KB
testcase_08 AC 132 ms
55,700 KB
testcase_09 AC 130 ms
55,872 KB
testcase_10 AC 123 ms
55,648 KB
testcase_11 AC 124 ms
55,588 KB
testcase_12 AC 129 ms
55,788 KB
testcase_13 AC 129 ms
56,064 KB
testcase_14 AC 127 ms
55,984 KB
testcase_15 AC 122 ms
55,700 KB
testcase_16 AC 126 ms
55,612 KB
testcase_17 AC 122 ms
55,776 KB
testcase_18 AC 119 ms
55,968 KB
testcase_19 AC 119 ms
56,060 KB
testcase_20 AC 120 ms
55,848 KB
testcase_21 AC 118 ms
55,668 KB
testcase_22 AC 126 ms
55,800 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