結果

問題 No.163 cAPSlOCK
ユーザー spacenautspacenaut
提出日時 2016-05-14 22:47:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 3,325 ms
コンパイル使用メモリ 80,520 KB
実行使用メモリ 41,756 KB
最終ジャッジ日時 2024-04-15 21:36:00
合計ジャッジ時間 6,874 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
40,936 KB
testcase_01 AC 120 ms
41,060 KB
testcase_02 AC 117 ms
41,320 KB
testcase_03 AC 110 ms
40,168 KB
testcase_04 AC 122 ms
41,120 KB
testcase_05 AC 115 ms
41,352 KB
testcase_06 AC 118 ms
41,128 KB
testcase_07 AC 122 ms
41,068 KB
testcase_08 AC 123 ms
41,756 KB
testcase_09 AC 112 ms
40,264 KB
testcase_10 AC 105 ms
39,888 KB
testcase_11 AC 104 ms
40,136 KB
testcase_12 AC 116 ms
40,752 KB
testcase_13 AC 120 ms
41,524 KB
testcase_14 AC 120 ms
41,164 KB
testcase_15 AC 119 ms
41,400 KB
testcase_16 AC 122 ms
41,028 KB
testcase_17 AC 118 ms
41,196 KB
testcase_18 AC 102 ms
40,328 KB
testcase_19 AC 115 ms
41,108 KB
testcase_20 AC 115 ms
41,244 KB
testcase_21 AC 117 ms
41,116 KB
testcase_22 AC 123 ms
41,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No0163{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		char[] c = str.toCharArray();
		
		for(int i = 0; i < str.length(); i ++){
			if(Character.isLowerCase(c[i])){
				System.out.print(Character.toUpperCase(c[i]));
			}else{
				System.out.print(Character.toLowerCase(c[i]));
			}
		}
		
		sc.close();
	}
}
0