結果

問題 No.163 cAPSlOCK
ユーザー kazapyon27kazapyon27
提出日時 2017-05-05 10:38:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 640 bytes
コンパイル時間 3,295 ms
コンパイル使用メモリ 74,576 KB
実行使用メモリ 50,104 KB
最終ジャッジ日時 2023-10-12 09:42:03
合計ジャッジ時間 5,559 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
49,612 KB
testcase_01 AC 47 ms
49,728 KB
testcase_02 AC 46 ms
49,620 KB
testcase_03 AC 49 ms
49,388 KB
testcase_04 AC 48 ms
49,760 KB
testcase_05 AC 47 ms
49,500 KB
testcase_06 AC 46 ms
49,732 KB
testcase_07 AC 48 ms
49,544 KB
testcase_08 AC 48 ms
49,628 KB
testcase_09 AC 47 ms
49,620 KB
testcase_10 AC 46 ms
47,348 KB
testcase_11 AC 48 ms
49,392 KB
testcase_12 AC 47 ms
50,104 KB
testcase_13 AC 47 ms
49,564 KB
testcase_14 AC 49 ms
49,460 KB
testcase_15 AC 49 ms
49,612 KB
testcase_16 AC 47 ms
49,440 KB
testcase_17 AC 49 ms
50,104 KB
testcase_18 AC 49 ms
49,388 KB
testcase_19 AC 52 ms
49,512 KB
testcase_20 AC 48 ms
49,608 KB
testcase_21 AC 51 ms
49,752 KB
testcase_22 AC 49 ms
49,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*No.163 cAPSlOCK*/
import java.io.*;
public class No163 {
	public static void main(String[] args) {
		String password,w_password=new String(),moji;
		try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){
			password=input.readLine();
			for(int i=0;i<password.length();i++){
				moji=password.substring(i, i+1);
				if(moji.codePointAt(0)>=65 &&moji.codePointAt(0)<=90){
					w_password+=moji.toLowerCase();
				}else if(moji.codePointAt(0)>=97 &&moji.codePointAt(0)<=122){
					w_password+=moji.toUpperCase();
				}
			}
			System.out.println(w_password);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
0