結果

問題 No.163 cAPSlOCK
ユーザー sasakkisasakki
提出日時 2016-04-14 16:20:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 448 bytes
コンパイル時間 6,024 ms
コンパイル使用メモリ 76,136 KB
実行使用メモリ 52,840 KB
最終ジャッジ日時 2024-04-15 01:25:28
合計ジャッジ時間 4,656 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
51,172 KB
testcase_01 AC 88 ms
50,900 KB
testcase_02 AC 79 ms
51,176 KB
testcase_03 AC 81 ms
51,352 KB
testcase_04 AC 80 ms
51,324 KB
testcase_05 AC 80 ms
52,596 KB
testcase_06 AC 79 ms
50,792 KB
testcase_07 AC 78 ms
50,980 KB
testcase_08 AC 91 ms
52,840 KB
testcase_09 AC 83 ms
51,220 KB
testcase_10 AC 80 ms
50,892 KB
testcase_11 AC 81 ms
50,924 KB
testcase_12 AC 81 ms
50,944 KB
testcase_13 AC 80 ms
51,372 KB
testcase_14 AC 81 ms
51,064 KB
testcase_15 AC 80 ms
51,156 KB
testcase_16 AC 80 ms
50,844 KB
testcase_17 AC 82 ms
51,220 KB
testcase_18 AC 90 ms
50,824 KB
testcase_19 AC 81 ms
51,016 KB
testcase_20 AC 78 ms
52,688 KB
testcase_21 AC 80 ms
50,800 KB
testcase_22 AC 91 ms
51,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

class Main{
	public static void main(String args[]) throws IOException{
		DataInputStream d = new DataInputStream(System.in);

		String str = d.readLine();
		String ans = "";

		for(int i = 0; i < str.length(); i++){
			if( (int)'a' <= (int) str.charAt(i) && (int) str.charAt(i) <= (int)'z' ){
				ans += (char)(str.charAt(i) - 32);
			}
			else{
				ans += (char)(str.charAt(i) + 32);
			}

		}

		System.out.println(ans);

	}
}
0