結果

問題 No.163 cAPSlOCK
ユーザー YOSHIYOSHI
提出日時 2021-03-02 21:23:14
言語 Java19
(openjdk 21)
結果
AC  
実行時間 45 ms / 5,000 ms
コード長 611 bytes
コンパイル時間 3,248 ms
コンパイル使用メモリ 72,316 KB
実行使用メモリ 49,756 KB
最終ジャッジ日時 2023-07-26 15:05:07
合計ジャッジ時間 5,488 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,232 KB
testcase_01 AC 43 ms
49,756 KB
testcase_02 AC 43 ms
49,712 KB
testcase_03 AC 42 ms
49,220 KB
testcase_04 AC 43 ms
49,124 KB
testcase_05 AC 43 ms
49,220 KB
testcase_06 AC 43 ms
49,212 KB
testcase_07 AC 42 ms
49,420 KB
testcase_08 AC 45 ms
49,188 KB
testcase_09 AC 45 ms
49,352 KB
testcase_10 AC 42 ms
49,160 KB
testcase_11 AC 42 ms
49,244 KB
testcase_12 AC 42 ms
49,644 KB
testcase_13 AC 44 ms
49,252 KB
testcase_14 AC 43 ms
49,344 KB
testcase_15 AC 43 ms
49,572 KB
testcase_16 AC 43 ms
49,220 KB
testcase_17 AC 42 ms
49,108 KB
testcase_18 AC 42 ms
49,336 KB
testcase_19 AC 43 ms
49,648 KB
testcase_20 AC 42 ms
49,212 KB
testcase_21 AC 42 ms
49,648 KB
testcase_22 AC 42 ms
49,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class No00000163_Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] charArr = br.readLine().toCharArray();
		char[] newCharArr = new char[charArr.length];
		for(int i = 0; i < charArr.length; i++) {
			if(Character.isUpperCase(charArr[i])) {
				newCharArr[i] = (char) (charArr[i] + 32);
			} else {
				newCharArr[i] = (char) (charArr[i] - 32);
			}
		}
		System.out.println(new String(newCharArr));
	}
}
0