結果

問題 No.163 cAPSlOCK
ユーザー core123core123
提出日時 2019-04-16 15:39:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 413 bytes
コンパイル時間 2,236 ms
コンパイル使用メモリ 75,724 KB
実行使用メモリ 57,624 KB
最終ジャッジ日時 2023-10-22 07:05:03
合計ジャッジ時間 6,229 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
57,264 KB
testcase_01 AC 124 ms
57,080 KB
testcase_02 AC 120 ms
57,224 KB
testcase_03 AC 124 ms
57,424 KB
testcase_04 AC 121 ms
57,440 KB
testcase_05 AC 122 ms
57,412 KB
testcase_06 AC 123 ms
57,548 KB
testcase_07 AC 121 ms
57,400 KB
testcase_08 AC 121 ms
57,476 KB
testcase_09 AC 123 ms
57,504 KB
testcase_10 AC 122 ms
57,196 KB
testcase_11 AC 125 ms
57,440 KB
testcase_12 AC 123 ms
57,420 KB
testcase_13 AC 124 ms
57,484 KB
testcase_14 AC 125 ms
57,408 KB
testcase_15 AC 124 ms
57,160 KB
testcase_16 AC 127 ms
57,624 KB
testcase_17 AC 126 ms
57,504 KB
testcase_18 AC 124 ms
57,428 KB
testcase_19 AC 122 ms
57,608 KB
testcase_20 AC 124 ms
57,468 KB
testcase_21 AC 125 ms
57,224 KB
testcase_22 AC 128 ms
57,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.stream.*;
public class Main{
	public static void main(String... args){
		Scanner sc=new Scanner(System.in);
		String string=sc.next();
		StringBuilder sb=new StringBuilder();
		for(char c:string.toCharArray()){
			if(Character.isUpperCase(c)){
				sb.append(Character.toLowerCase(c));
			}else{
				sb.append(Character.toUpperCase(c));
			}
		}
		System.out.println(sb);
	}
}
0