結果

問題 No.163 cAPSlOCK
ユーザー hikari2004hikari2004
提出日時 2016-04-20 12:53:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 3,611 ms
コンパイル使用メモリ 75,740 KB
実行使用メモリ 54,512 KB
最終ジャッジ日時 2024-04-15 03:53:01
合計ジャッジ時間 7,707 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
52,928 KB
testcase_01 AC 117 ms
54,024 KB
testcase_02 AC 106 ms
53,092 KB
testcase_03 AC 112 ms
53,204 KB
testcase_04 AC 122 ms
54,164 KB
testcase_05 AC 114 ms
54,512 KB
testcase_06 AC 117 ms
53,916 KB
testcase_07 AC 109 ms
52,884 KB
testcase_08 AC 115 ms
53,568 KB
testcase_09 AC 122 ms
54,340 KB
testcase_10 AC 111 ms
54,004 KB
testcase_11 AC 103 ms
53,076 KB
testcase_12 AC 105 ms
52,752 KB
testcase_13 AC 108 ms
53,000 KB
testcase_14 AC 120 ms
54,228 KB
testcase_15 AC 118 ms
54,356 KB
testcase_16 AC 125 ms
54,352 KB
testcase_17 AC 118 ms
54,172 KB
testcase_18 AC 119 ms
54,012 KB
testcase_19 AC 110 ms
53,776 KB
testcase_20 AC 116 ms
54,116 KB
testcase_21 AC 113 ms
54,124 KB
testcase_22 AC 113 ms
53,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No163 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		char[] c = str.toCharArray();

		for(int i = 0; i < str.length(); i++){
			if(Character.isLowerCase(c[i])){
				System.out.print(Character.toUpperCase(c[i]));
			} else {
				System.out.print(Character.toLowerCase(c[i]));
			}
		}

		sc.close();

		}
}
0