結果

問題 No.163 cAPSlOCK
ユーザー YOSHIYOSHI
提出日時 2021-03-02 21:23:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 54 ms / 5,000 ms
コード長 611 bytes
コンパイル時間 3,532 ms
コンパイル使用メモリ 74,644 KB
実行使用メモリ 50,400 KB
最終ジャッジ日時 2024-04-14 04:59:18
合計ジャッジ時間 5,611 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
50,396 KB
testcase_01 AC 53 ms
50,256 KB
testcase_02 AC 53 ms
49,956 KB
testcase_03 AC 52 ms
50,336 KB
testcase_04 AC 53 ms
50,076 KB
testcase_05 AC 54 ms
50,268 KB
testcase_06 AC 54 ms
50,256 KB
testcase_07 AC 53 ms
50,252 KB
testcase_08 AC 54 ms
50,272 KB
testcase_09 AC 53 ms
50,148 KB
testcase_10 AC 53 ms
50,332 KB
testcase_11 AC 53 ms
50,228 KB
testcase_12 AC 52 ms
50,028 KB
testcase_13 AC 52 ms
50,316 KB
testcase_14 AC 52 ms
50,244 KB
testcase_15 AC 53 ms
50,384 KB
testcase_16 AC 53 ms
50,128 KB
testcase_17 AC 52 ms
50,252 KB
testcase_18 AC 52 ms
50,248 KB
testcase_19 AC 53 ms
50,340 KB
testcase_20 AC 54 ms
50,260 KB
testcase_21 AC 54 ms
50,168 KB
testcase_22 AC 53 ms
50,400 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