結果

問題 No.163 cAPSlOCK
ユーザー l1267976l1267976
提出日時 2017-03-07 21:02:38
言語 Java19
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 558 bytes
コンパイル時間 3,638 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 56,064 KB
最終ジャッジ日時 2023-09-05 22:33:33
合計ジャッジ時間 7,528 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,440 KB
testcase_01 AC 119 ms
55,704 KB
testcase_02 AC 118 ms
55,444 KB
testcase_03 AC 119 ms
55,952 KB
testcase_04 AC 120 ms
55,836 KB
testcase_05 AC 121 ms
55,924 KB
testcase_06 AC 121 ms
56,064 KB
testcase_07 AC 120 ms
55,792 KB
testcase_08 AC 120 ms
55,944 KB
testcase_09 AC 119 ms
55,880 KB
testcase_10 AC 119 ms
55,752 KB
testcase_11 AC 122 ms
55,924 KB
testcase_12 AC 121 ms
55,652 KB
testcase_13 AC 124 ms
55,868 KB
testcase_14 AC 124 ms
55,644 KB
testcase_15 AC 122 ms
55,632 KB
testcase_16 AC 123 ms
55,844 KB
testcase_17 AC 122 ms
56,048 KB
testcase_18 AC 122 ms
55,764 KB
testcase_19 AC 124 ms
55,584 KB
testcase_20 AC 124 ms
56,056 KB
testcase_21 AC 124 ms
56,012 KB
testcase_22 AC 124 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No163 {

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

        String result = "";

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            if (c < 'a') {
                result += String.valueOf(s.charAt(i)).toLowerCase();
            } else {
                result += String.valueOf(s.charAt(i)).toUpperCase();
            }
        }

        System.out.println(result);

        sc.close();
    }

}
0