結果

問題 No.163 cAPSlOCK
ユーザー kenkooookenkoooo
提出日時 2015-03-12 23:34:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 430 bytes
コンパイル時間 2,302 ms
コンパイル使用メモリ 72,292 KB
実行使用メモリ 56,124 KB
最終ジャッジ日時 2023-09-07 02:01:12
合計ジャッジ時間 6,313 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,684 KB
testcase_01 AC 121 ms
55,904 KB
testcase_02 AC 120 ms
55,488 KB
testcase_03 AC 128 ms
56,068 KB
testcase_04 AC 125 ms
55,936 KB
testcase_05 AC 119 ms
55,880 KB
testcase_06 AC 119 ms
55,736 KB
testcase_07 AC 127 ms
53,948 KB
testcase_08 AC 125 ms
56,124 KB
testcase_09 AC 125 ms
55,612 KB
testcase_10 AC 123 ms
56,060 KB
testcase_11 AC 121 ms
55,756 KB
testcase_12 AC 124 ms
56,000 KB
testcase_13 AC 123 ms
55,792 KB
testcase_14 AC 126 ms
55,720 KB
testcase_15 AC 123 ms
56,124 KB
testcase_16 AC 129 ms
56,028 KB
testcase_17 AC 123 ms
55,740 KB
testcase_18 AC 122 ms
55,732 KB
testcase_19 AC 121 ms
55,616 KB
testcase_20 AC 124 ms
55,408 KB
testcase_21 AC 121 ms
53,588 KB
testcase_22 AC 129 ms
55,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] input = sc.next().toCharArray();
		sc.close();
		for (int i = 0; i < input.length; i++) {
			if (Character.isUpperCase(input[i])) {
				System.out.print(Character.toLowerCase(input[i]));
			} else {
				System.out.print(Character.toUpperCase(input[i]));
			}
		}
		System.out.println();

	}
}
0