結果

問題 No.163 cAPSlOCK
ユーザー mits58mits58
提出日時 2016-06-05 17:33:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 5,000 ms
コード長 412 bytes
コンパイル時間 1,984 ms
コンパイル使用メモリ 74,212 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2024-04-17 05:01:14
合計ジャッジ時間 5,712 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
41,496 KB
testcase_01 AC 112 ms
41,368 KB
testcase_02 AC 121 ms
40,964 KB
testcase_03 AC 127 ms
41,004 KB
testcase_04 AC 116 ms
41,008 KB
testcase_05 AC 123 ms
40,960 KB
testcase_06 AC 124 ms
41,064 KB
testcase_07 AC 126 ms
41,308 KB
testcase_08 AC 131 ms
40,896 KB
testcase_09 AC 113 ms
41,316 KB
testcase_10 AC 119 ms
41,236 KB
testcase_11 AC 122 ms
41,164 KB
testcase_12 AC 129 ms
40,824 KB
testcase_13 AC 132 ms
41,272 KB
testcase_14 AC 117 ms
41,440 KB
testcase_15 AC 128 ms
41,072 KB
testcase_16 AC 128 ms
41,144 KB
testcase_17 AC 123 ms
40,956 KB
testcase_18 AC 110 ms
41,372 KB
testcase_19 AC 123 ms
41,384 KB
testcase_20 AC 125 ms
40,996 KB
testcase_21 AC 121 ms
41,176 KB
testcase_22 AC 127 ms
41,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			String str=sc.next();
			for(int i=0;i<str.length();i++){
				if(Character.isUpperCase(str.charAt(i))) System.out.print(Character.toLowerCase(str.charAt(i)));
				else System.out.print(Character.toUpperCase(str.charAt(i)));
			}
			System.out.println();
		}
	}
}
0