結果

問題 No.163 cAPSlOCK
ユーザー kuramukuramu
提出日時 2016-01-19 17:00:33
言語 Java19
(openjdk 21)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 660 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 53,692 KB
最終ジャッジ日時 2023-10-21 06:52:49
合計ジャッジ時間 4,429 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
53,664 KB
testcase_01 AC 56 ms
53,664 KB
testcase_02 AC 56 ms
52,600 KB
testcase_03 AC 57 ms
53,672 KB
testcase_04 AC 57 ms
53,668 KB
testcase_05 AC 57 ms
52,592 KB
testcase_06 AC 57 ms
52,580 KB
testcase_07 AC 56 ms
53,668 KB
testcase_08 AC 56 ms
53,664 KB
testcase_09 AC 58 ms
53,672 KB
testcase_10 AC 55 ms
52,548 KB
testcase_11 AC 57 ms
53,664 KB
testcase_12 AC 57 ms
52,580 KB
testcase_13 AC 57 ms
53,668 KB
testcase_14 AC 57 ms
52,600 KB
testcase_15 AC 57 ms
53,612 KB
testcase_16 AC 57 ms
53,692 KB
testcase_17 AC 58 ms
52,604 KB
testcase_18 AC 55 ms
53,668 KB
testcase_19 AC 56 ms
52,596 KB
testcase_20 AC 56 ms
52,636 KB
testcase_21 AC 56 ms
52,596 KB
testcase_22 AC 56 ms
52,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.Character;
public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in));
		String [] chars = stdReader.readLine().split("");
		StringBuilder sb = new StringBuilder();
		
		for(int i=0;i<chars.length;i++){
			if(chars[i].equals(chars[i].toUpperCase())){
				chars[i] = chars[i].toLowerCase();
			}else{
				chars[i] = chars[i].toUpperCase();
			}
			sb.append(chars[i]);
		}			
		System.out.println(sb.toString());
	}

}
0