結果

問題 No.163 cAPSlOCK
ユーザー 37zigen37zigen
提出日時 2016-03-31 17:53:55
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 2,037 ms
コンパイル使用メモリ 72,400 KB
実行使用メモリ 55,996 KB
最終ジャッジ日時 2023-07-25 14:38:55
合計ジャッジ時間 6,123 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,476 KB
testcase_01 AC 120 ms
55,648 KB
testcase_02 AC 121 ms
55,540 KB
testcase_03 AC 129 ms
55,736 KB
testcase_04 AC 129 ms
53,608 KB
testcase_05 AC 121 ms
55,636 KB
testcase_06 AC 122 ms
55,640 KB
testcase_07 AC 127 ms
55,780 KB
testcase_08 AC 130 ms
55,876 KB
testcase_09 AC 129 ms
55,560 KB
testcase_10 AC 128 ms
55,292 KB
testcase_11 AC 124 ms
55,604 KB
testcase_12 AC 127 ms
53,904 KB
testcase_13 AC 123 ms
55,612 KB
testcase_14 AC 125 ms
55,996 KB
testcase_15 AC 123 ms
55,872 KB
testcase_16 AC 127 ms
55,556 KB
testcase_17 AC 125 ms
55,508 KB
testcase_18 AC 121 ms
55,292 KB
testcase_19 AC 119 ms
55,692 KB
testcase_20 AC 120 ms
55,408 KB
testcase_21 AC 119 ms
55,688 KB
testcase_22 AC 127 ms
55,764 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