結果

問題 No.163 cAPSlOCK
ユーザー koukonkokoukonko
提出日時 2015-12-13 02:45:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 51 ms / 5,000 ms
コード長 559 bytes
コンパイル時間 2,151 ms
コンパイル使用メモリ 74,844 KB
実行使用メモリ 51,640 KB
最終ジャッジ日時 2023-10-13 14:12:54
合計ジャッジ時間 4,429 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
49,616 KB
testcase_01 AC 48 ms
49,512 KB
testcase_02 AC 49 ms
51,640 KB
testcase_03 AC 50 ms
49,704 KB
testcase_04 AC 51 ms
49,536 KB
testcase_05 AC 51 ms
49,724 KB
testcase_06 AC 49 ms
49,808 KB
testcase_07 AC 49 ms
49,648 KB
testcase_08 AC 50 ms
49,616 KB
testcase_09 AC 49 ms
49,688 KB
testcase_10 AC 50 ms
49,468 KB
testcase_11 AC 49 ms
48,112 KB
testcase_12 AC 49 ms
49,728 KB
testcase_13 AC 49 ms
49,864 KB
testcase_14 AC 49 ms
49,916 KB
testcase_15 AC 50 ms
48,076 KB
testcase_16 AC 50 ms
49,512 KB
testcase_17 AC 48 ms
49,748 KB
testcase_18 AC 50 ms
49,540 KB
testcase_19 AC 50 ms
49,836 KB
testcase_20 AC 49 ms
49,572 KB
testcase_21 AC 48 ms
49,576 KB
testcase_22 AC 50 ms
49,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {
			String line = read.readLine();
			String ans = "";

			for (int i = 0; i < line.length(); ++i) {
				if (line.charAt(i) <= 0x5A) {
					ans += (line.charAt(i) + "").toLowerCase();
				} else {
					ans += (line.charAt(i) + "").toUpperCase();
				}
			}

			System.out.println(ans);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0