結果

問題 No.163 cAPSlOCK
ユーザー mobius_bkstmobius_bkst
提出日時 2015-04-20 19:36:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 48 ms / 5,000 ms
コード長 803 bytes
コンパイル時間 3,382 ms
コンパイル使用メモリ 85,868 KB
実行使用メモリ 49,596 KB
最終ジャッジ日時 2023-09-18 01:44:08
合計ジャッジ時間 5,487 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,124 KB
testcase_01 AC 43 ms
49,436 KB
testcase_02 AC 44 ms
49,236 KB
testcase_03 AC 48 ms
49,444 KB
testcase_04 AC 46 ms
49,196 KB
testcase_05 AC 44 ms
49,304 KB
testcase_06 AC 44 ms
49,340 KB
testcase_07 AC 46 ms
49,128 KB
testcase_08 AC 47 ms
49,272 KB
testcase_09 AC 44 ms
49,232 KB
testcase_10 AC 44 ms
47,324 KB
testcase_11 AC 44 ms
49,204 KB
testcase_12 AC 44 ms
49,304 KB
testcase_13 AC 45 ms
49,276 KB
testcase_14 AC 45 ms
49,264 KB
testcase_15 AC 44 ms
49,180 KB
testcase_16 AC 47 ms
49,596 KB
testcase_17 AC 44 ms
49,372 KB
testcase_18 AC 44 ms
49,180 KB
testcase_19 AC 44 ms
49,148 KB
testcase_20 AC 45 ms
49,140 KB
testcase_21 AC 43 ms
49,148 KB
testcase_22 AC 47 ms
49,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class No163 {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            String S = br.readLine();
            char[] SCharArray = S.toCharArray();

            for (int i = 0; i < SCharArray.length; i++) {
                if ('a' <= SCharArray[i] && SCharArray[i] <= 'z') {
                    System.out.print((char) (SCharArray[i] - 32));
                } else {
                    System.out.print((char) (SCharArray[i] + 32));
                }
            }
            System.out.println();

        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
        }
    }

}
0