結果

問題 No.163 cAPSlOCK
ユーザー n_gojon_gojo
提出日時 2020-04-09 18:35:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 594 bytes
コンパイル時間 4,491 ms
コンパイル使用メモリ 73,160 KB
実行使用メモリ 56,072 KB
最終ジャッジ日時 2023-10-11 17:16:45
合計ジャッジ時間 8,273 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,280 KB
testcase_01 AC 119 ms
55,828 KB
testcase_02 AC 120 ms
55,756 KB
testcase_03 AC 126 ms
55,688 KB
testcase_04 AC 126 ms
55,692 KB
testcase_05 AC 119 ms
56,012 KB
testcase_06 AC 120 ms
54,128 KB
testcase_07 AC 124 ms
55,716 KB
testcase_08 AC 128 ms
55,332 KB
testcase_09 AC 123 ms
55,976 KB
testcase_10 AC 120 ms
55,632 KB
testcase_11 AC 122 ms
55,276 KB
testcase_12 AC 125 ms
55,632 KB
testcase_13 AC 127 ms
55,272 KB
testcase_14 AC 125 ms
55,940 KB
testcase_15 AC 125 ms
55,796 KB
testcase_16 AC 127 ms
55,788 KB
testcase_17 AC 123 ms
55,964 KB
testcase_18 AC 122 ms
56,072 KB
testcase_19 AC 120 ms
55,548 KB
testcase_20 AC 121 ms
55,936 KB
testcase_21 AC 119 ms
55,544 KB
testcase_22 AC 126 ms
55,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No163 {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);

        String str = sc.next();

        for (int i = 0; i < str.length(); i++) {
            if (Character.isUpperCase(str.charAt(i))) {
                System.out.print(Character.toLowerCase(str.charAt(i)));
            } else {
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println("");
    }
}
0