結果

問題 No.163 cAPSlOCK
ユーザー villachvillach
提出日時 2017-10-13 15:57:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 443 bytes
コンパイル時間 3,677 ms
コンパイル使用メモリ 85,380 KB
実行使用メモリ 54,420 KB
最終ジャッジ日時 2024-04-28 17:30:11
合計ジャッジ時間 7,544 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
54,024 KB
testcase_01 AC 131 ms
54,224 KB
testcase_02 AC 132 ms
53,712 KB
testcase_03 AC 132 ms
54,224 KB
testcase_04 AC 133 ms
53,804 KB
testcase_05 AC 130 ms
54,112 KB
testcase_06 AC 131 ms
54,084 KB
testcase_07 AC 134 ms
54,148 KB
testcase_08 AC 133 ms
54,092 KB
testcase_09 AC 132 ms
53,524 KB
testcase_10 AC 131 ms
54,140 KB
testcase_11 AC 136 ms
54,064 KB
testcase_12 AC 131 ms
54,220 KB
testcase_13 AC 131 ms
54,080 KB
testcase_14 AC 131 ms
54,180 KB
testcase_15 AC 130 ms
54,420 KB
testcase_16 AC 133 ms
54,116 KB
testcase_17 AC 133 ms
54,100 KB
testcase_18 AC 135 ms
53,800 KB
testcase_19 AC 130 ms
53,968 KB
testcase_20 AC 132 ms
53,948 KB
testcase_21 AC 133 ms
53,804 KB
testcase_22 AC 132 ms
54,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class N163 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String hoge = sc.nextLine();
		String fuga = "";
		Character c;
		for(int i = 0;i < hoge.length();++i){
			c = hoge.charAt(i);
			if(Character.isLowerCase(c)){
				c = Character.toUpperCase(c);
			}else{
				c = Character.toLowerCase(c);
			}
			fuga += c;
		}
		System.out.println(fuga);
	}
}
0