結果

問題 No.163 cAPSlOCK
ユーザー howakurohowakuro
提出日時 2015-09-25 01:19:22
言語 Java19
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 479 bytes
コンパイル時間 3,704 ms
コンパイル使用メモリ 72,952 KB
実行使用メモリ 56,116 KB
最終ジャッジ日時 2023-09-26 14:57:30
合計ジャッジ時間 7,550 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,664 KB
testcase_01 AC 117 ms
55,676 KB
testcase_02 AC 117 ms
55,664 KB
testcase_03 AC 118 ms
55,516 KB
testcase_04 AC 120 ms
55,680 KB
testcase_05 AC 118 ms
55,800 KB
testcase_06 AC 118 ms
55,468 KB
testcase_07 AC 121 ms
55,460 KB
testcase_08 AC 120 ms
55,720 KB
testcase_09 AC 122 ms
55,404 KB
testcase_10 AC 121 ms
56,116 KB
testcase_11 AC 118 ms
55,760 KB
testcase_12 AC 119 ms
55,636 KB
testcase_13 AC 120 ms
55,800 KB
testcase_14 AC 122 ms
55,428 KB
testcase_15 AC 121 ms
55,396 KB
testcase_16 AC 121 ms
56,060 KB
testcase_17 AC 120 ms
55,592 KB
testcase_18 AC 119 ms
55,820 KB
testcase_19 AC 119 ms
55,672 KB
testcase_20 AC 120 ms
55,664 KB
testcase_21 AC 120 ms
55,580 KB
testcase_22 AC 119 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Puroguram{
	static Scanner scan= new Scanner(System.in);
	
	public static void main(String[] Args){
		String S =scan.next();
		
		StringBuilder S2 = new StringBuilder();
		for (int i=0; i<S.length(); i++){
			Character C1=S.charAt(i);
			if(Character.isUpperCase(C1)==true){
				S2.append(Character.toLowerCase(C1));
			}else{
				Character.toLowerCase(C1);
				S2.append(Character.toUpperCase(C1));
			}
		}
		System.out.println(S2);
	}
}
0