結果

問題 No.163 cAPSlOCK
ユーザー 37zigen37zigen
提出日時 2016-03-31 17:53:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 2,093 ms
コンパイル使用メモリ 74,488 KB
実行使用メモリ 54,304 KB
最終ジャッジ日時 2024-04-10 06:50:01
合計ジャッジ時間 5,741 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
53,968 KB
testcase_01 AC 119 ms
54,124 KB
testcase_02 AC 119 ms
53,972 KB
testcase_03 AC 131 ms
54,120 KB
testcase_04 AC 133 ms
54,124 KB
testcase_05 AC 121 ms
54,040 KB
testcase_06 AC 120 ms
54,140 KB
testcase_07 AC 124 ms
54,108 KB
testcase_08 AC 126 ms
53,872 KB
testcase_09 AC 113 ms
53,032 KB
testcase_10 AC 110 ms
52,760 KB
testcase_11 AC 107 ms
52,996 KB
testcase_12 AC 125 ms
54,304 KB
testcase_13 AC 123 ms
54,112 KB
testcase_14 AC 127 ms
54,176 KB
testcase_15 AC 115 ms
53,184 KB
testcase_16 AC 129 ms
54,048 KB
testcase_17 AC 123 ms
54,148 KB
testcase_18 AC 119 ms
54,108 KB
testcase_19 AC 122 ms
54,184 KB
testcase_20 AC 120 ms
54,104 KB
testcase_21 AC 121 ms
54,088 KB
testcase_22 AC 126 ms
54,216 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