結果

問題 No.163 cAPSlOCK
ユーザー dogwood0424dogwood0424
提出日時 2017-11-29 11:43:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 161 ms / 5,000 ms
コード長 373 bytes
コンパイル時間 3,999 ms
コンパイル使用メモリ 80,360 KB
実行使用メモリ 57,104 KB
最終ジャッジ日時 2023-08-18 13:30:46
合計ジャッジ時間 8,173 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
56,976 KB
testcase_01 AC 154 ms
56,796 KB
testcase_02 AC 157 ms
56,836 KB
testcase_03 AC 160 ms
56,852 KB
testcase_04 AC 155 ms
56,640 KB
testcase_05 AC 155 ms
54,804 KB
testcase_06 AC 158 ms
56,852 KB
testcase_07 AC 153 ms
56,616 KB
testcase_08 AC 158 ms
56,884 KB
testcase_09 AC 157 ms
56,864 KB
testcase_10 AC 154 ms
56,976 KB
testcase_11 AC 158 ms
57,048 KB
testcase_12 AC 158 ms
56,856 KB
testcase_13 AC 157 ms
56,952 KB
testcase_14 AC 154 ms
57,104 KB
testcase_15 AC 157 ms
56,912 KB
testcase_16 AC 156 ms
56,948 KB
testcase_17 AC 155 ms
56,848 KB
testcase_18 AC 156 ms
56,912 KB
testcase_19 AC 156 ms
56,848 KB
testcase_20 AC 152 ms
56,560 KB
testcase_21 AC 156 ms
57,024 KB
testcase_22 AC 160 ms
56,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No163{
	public static void main(String[]args){
		Scanner sc = new Scanner(System.in);

		String p = sc.nextLine();
		String P = "";

		for(int i=0;i<p.length();i++) {

			P +=Character.isUpperCase(p.charAt(i)) ?
					Character.toLowerCase(p.charAt(i)) :
					Character.toUpperCase(p.charAt(i));

		}

		System.out.println(P);



	}
}
0