結果

問題 No.163 cAPSlOCK
ユーザー omc-testomc-test
提出日時 2016-08-04 16:21:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 468 bytes
コンパイル時間 4,259 ms
コンパイル使用メモリ 76,596 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2024-04-24 15:28:56
合計ジャッジ時間 8,583 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,068 KB
testcase_01 AC 131 ms
41,056 KB
testcase_02 AC 119 ms
39,700 KB
testcase_03 AC 134 ms
41,156 KB
testcase_04 AC 130 ms
41,304 KB
testcase_05 AC 131 ms
41,112 KB
testcase_06 AC 130 ms
41,136 KB
testcase_07 AC 133 ms
41,128 KB
testcase_08 AC 132 ms
41,212 KB
testcase_09 AC 134 ms
41,388 KB
testcase_10 AC 133 ms
41,112 KB
testcase_11 AC 132 ms
41,304 KB
testcase_12 AC 132 ms
41,012 KB
testcase_13 AC 130 ms
41,244 KB
testcase_14 AC 119 ms
40,096 KB
testcase_15 AC 132 ms
41,048 KB
testcase_16 AC 122 ms
40,096 KB
testcase_17 AC 133 ms
41,144 KB
testcase_18 AC 131 ms
41,032 KB
testcase_19 AC 133 ms
41,044 KB
testcase_20 AC 133 ms
41,496 KB
testcase_21 AC 131 ms
40,920 KB
testcase_22 AC 132 ms
41,028 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