結果

問題 No.163 cAPSlOCK
ユーザー yu_017yu_017
提出日時 2019-01-14 09:57:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 399 bytes
コンパイル時間 3,307 ms
コンパイル使用メモリ 72,504 KB
実行使用メモリ 56,392 KB
最終ジャッジ日時 2023-08-30 22:40:13
合計ジャッジ時間 7,571 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,792 KB
testcase_01 AC 120 ms
55,972 KB
testcase_02 AC 121 ms
55,824 KB
testcase_03 AC 122 ms
56,392 KB
testcase_04 AC 119 ms
55,476 KB
testcase_05 AC 118 ms
55,856 KB
testcase_06 AC 118 ms
55,832 KB
testcase_07 AC 121 ms
55,448 KB
testcase_08 AC 117 ms
55,896 KB
testcase_09 AC 120 ms
55,828 KB
testcase_10 AC 120 ms
55,868 KB
testcase_11 AC 120 ms
55,912 KB
testcase_12 AC 121 ms
55,780 KB
testcase_13 AC 120 ms
56,348 KB
testcase_14 AC 124 ms
56,024 KB
testcase_15 AC 122 ms
55,936 KB
testcase_16 AC 121 ms
55,728 KB
testcase_17 AC 122 ms
56,080 KB
testcase_18 AC 123 ms
55,880 KB
testcase_19 AC 121 ms
56,304 KB
testcase_20 AC 119 ms
55,676 KB
testcase_21 AC 119 ms
55,676 KB
testcase_22 AC 122 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class A000163 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String pass = sc.nextLine();
		sc.close();
		StringBuilder r = new StringBuilder();
		for(char c:pass.toCharArray()) {
			if(c<'a') {
				r.append((char)(c-'A'+'a'));
			}else {
				r.append((char)(c-'a'+'A'));
			}
		}
		System.out.println(r.toString());
		
	}

}
0