結果

問題 No.163 cAPSlOCK
ユーザー 37zigen37zigen
提出日時 2016-03-31 17:53:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 73,968 KB
実行使用メモリ 41,536 KB
最終ジャッジ日時 2024-10-02 08:30:09
合計ジャッジ時間 5,974 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,384 KB
testcase_01 AC 127 ms
40,964 KB
testcase_02 AC 127 ms
41,088 KB
testcase_03 AC 134 ms
41,216 KB
testcase_04 AC 135 ms
41,216 KB
testcase_05 AC 128 ms
41,464 KB
testcase_06 AC 128 ms
40,956 KB
testcase_07 AC 135 ms
40,888 KB
testcase_08 AC 133 ms
41,292 KB
testcase_09 AC 134 ms
40,964 KB
testcase_10 AC 128 ms
40,920 KB
testcase_11 AC 128 ms
40,972 KB
testcase_12 AC 134 ms
41,248 KB
testcase_13 AC 134 ms
41,244 KB
testcase_14 AC 135 ms
40,908 KB
testcase_15 AC 134 ms
41,536 KB
testcase_16 AC 134 ms
41,228 KB
testcase_17 AC 130 ms
40,908 KB
testcase_18 AC 128 ms
40,764 KB
testcase_19 AC 129 ms
41,096 KB
testcase_20 AC 128 ms
41,308 KB
testcase_21 AC 127 ms
41,060 KB
testcase_22 AC 133 ms
40,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder163;
import java.util.Scanner;
public class Main {
	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]));
			}
		}
	}
}
0