結果

問題 No.163 cAPSlOCK
ユーザー kuramubonnkuramubonn
提出日時 2023-02-01 20:39:52
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 2,562 ms
コンパイル使用メモリ 71,508 KB
実行使用メモリ 56,280 KB
最終ジャッジ日時 2023-09-14 06:35:28
合計ジャッジ時間 6,831 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,860 KB
testcase_01 AC 117 ms
55,904 KB
testcase_02 AC 117 ms
55,632 KB
testcase_03 AC 127 ms
56,020 KB
testcase_04 AC 124 ms
55,648 KB
testcase_05 AC 119 ms
55,424 KB
testcase_06 AC 117 ms
55,772 KB
testcase_07 AC 122 ms
56,044 KB
testcase_08 AC 122 ms
55,920 KB
testcase_09 AC 119 ms
55,928 KB
testcase_10 AC 119 ms
55,916 KB
testcase_11 AC 121 ms
55,372 KB
testcase_12 AC 123 ms
56,036 KB
testcase_13 AC 123 ms
55,772 KB
testcase_14 AC 125 ms
55,540 KB
testcase_15 AC 124 ms
56,020 KB
testcase_16 AC 124 ms
56,280 KB
testcase_17 AC 122 ms
56,080 KB
testcase_18 AC 121 ms
55,408 KB
testcase_19 AC 119 ms
55,696 KB
testcase_20 AC 119 ms
55,432 KB
testcase_21 AC 116 ms
55,988 KB
testcase_22 AC 128 ms
55,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		char[] c = str.toCharArray();
		for(char ch:c) {
			if(Character.isLowerCase(ch)) {
				System.out.print(Character.toUpperCase(ch));
			}else if(Character.isUpperCase(ch)) {
				System.out.print(Character.toLowerCase(ch));
			}
		}
		System.out.println("");
	}
}
0