結果

問題 No.163 cAPSlOCK
ユーザー 練習生練習生
提出日時 2015-08-19 07:46:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 499 bytes
コンパイル時間 3,309 ms
コンパイル使用メモリ 75,132 KB
実行使用メモリ 41,400 KB
最終ジャッジ日時 2024-07-18 10:28:00
合計ジャッジ時間 6,571 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
39,968 KB
testcase_01 AC 115 ms
41,256 KB
testcase_02 AC 109 ms
41,400 KB
testcase_03 AC 115 ms
41,116 KB
testcase_04 AC 115 ms
39,892 KB
testcase_05 AC 99 ms
40,272 KB
testcase_06 AC 113 ms
41,284 KB
testcase_07 AC 110 ms
41,124 KB
testcase_08 AC 103 ms
40,240 KB
testcase_09 AC 116 ms
41,272 KB
testcase_10 AC 98 ms
40,260 KB
testcase_11 AC 98 ms
40,092 KB
testcase_12 AC 113 ms
39,984 KB
testcase_13 AC 105 ms
40,048 KB
testcase_14 AC 124 ms
41,132 KB
testcase_15 AC 116 ms
41,332 KB
testcase_16 AC 116 ms
41,340 KB
testcase_17 AC 123 ms
41,264 KB
testcase_18 AC 115 ms
41,116 KB
testcase_19 AC 114 ms
41,388 KB
testcase_20 AC 114 ms
41,144 KB
testcase_21 AC 111 ms
41,140 KB
testcase_22 AC 121 ms
41,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No163 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String password = sc.next();
		sc.close();
		// 一文字ずつ小文字かどうか調べて変換する
		for(int i = 0; i < password.length(); i++){
			if(Character.isLowerCase(password.charAt(i))){
				System.out.print(String.valueOf(password.charAt(i)).toUpperCase());
			}else{
				System.out.print(String.valueOf(password.charAt(i)).toLowerCase());
			}
		}
	}
}
0