結果

問題 No.163 cAPSlOCK
ユーザー omc-testomc-test
提出日時 2016-08-04 16:21:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 468 bytes
コンパイル時間 5,747 ms
コンパイル使用メモリ 74,404 KB
実行使用メモリ 56,092 KB
最終ジャッジ日時 2023-08-06 20:55:18
合計ジャッジ時間 9,810 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,620 KB
testcase_01 AC 124 ms
55,656 KB
testcase_02 AC 125 ms
55,732 KB
testcase_03 AC 126 ms
55,872 KB
testcase_04 AC 125 ms
55,756 KB
testcase_05 AC 125 ms
55,552 KB
testcase_06 AC 122 ms
55,728 KB
testcase_07 AC 124 ms
55,772 KB
testcase_08 AC 127 ms
55,776 KB
testcase_09 AC 128 ms
56,092 KB
testcase_10 AC 125 ms
55,680 KB
testcase_11 AC 126 ms
55,700 KB
testcase_12 AC 123 ms
55,864 KB
testcase_13 AC 125 ms
55,864 KB
testcase_14 AC 125 ms
55,664 KB
testcase_15 AC 124 ms
55,896 KB
testcase_16 AC 127 ms
55,860 KB
testcase_17 AC 129 ms
55,636 KB
testcase_18 AC 126 ms
56,064 KB
testcase_19 AC 122 ms
55,696 KB
testcase_20 AC 122 ms
55,768 KB
testcase_21 AC 126 ms
55,708 KB
testcase_22 AC 126 ms
55,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No0163 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String falsePass = sc.nextLine();
		String truePass = new String();
		for(int i=0; i<falsePass.length(); i++){
			char c = falsePass.charAt(i);
			if((int) c >= 'A' && (int) c <= 'Z'){
				truePass += String.valueOf(c).toLowerCase();
			}else{
				truePass += String.valueOf(c).toUpperCase();
			}
		}
		System.out.println(truePass);
	}
}
0