結果

問題 No.163 cAPSlOCK
ユーザー ffmm00ffmm00
提出日時 2015-06-08 07:34:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 365 bytes
コンパイル時間 3,316 ms
コンパイル使用メモリ 72,676 KB
実行使用メモリ 55,876 KB
最終ジャッジ日時 2023-09-20 19:45:59
合計ジャッジ時間 7,494 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,612 KB
testcase_01 AC 121 ms
55,588 KB
testcase_02 AC 121 ms
55,424 KB
testcase_03 AC 123 ms
55,856 KB
testcase_04 AC 123 ms
55,764 KB
testcase_05 AC 122 ms
55,360 KB
testcase_06 AC 123 ms
55,688 KB
testcase_07 AC 123 ms
55,676 KB
testcase_08 AC 122 ms
55,788 KB
testcase_09 AC 122 ms
55,376 KB
testcase_10 AC 121 ms
55,768 KB
testcase_11 AC 121 ms
55,792 KB
testcase_12 AC 123 ms
55,308 KB
testcase_13 AC 122 ms
55,752 KB
testcase_14 AC 123 ms
55,364 KB
testcase_15 AC 121 ms
55,556 KB
testcase_16 AC 124 ms
55,612 KB
testcase_17 AC 123 ms
55,864 KB
testcase_18 AC 124 ms
55,460 KB
testcase_19 AC 123 ms
55,876 KB
testcase_20 AC 123 ms
55,644 KB
testcase_21 AC 122 ms
55,688 KB
testcase_22 AC 124 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N163 {

	public static void main(String[] args) {

		Scanner sca = new Scanner(System.in);

		char[] S = sca.next().toCharArray();
		for (int i = 0; i < S.length; i++) {
			if ('a' <= S[i] && S[i] <= 'z')
				S[i] = (char) (S[i] - 'a' + 'A');
			else
				S[i] = (char) (S[i] - 'A' + 'a');
		}

		System.out.println(S);

	}

}
0