結果

問題 No.163 cAPSlOCK
ユーザー HEGO55HEGO55
提出日時 2017-05-27 12:40:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 5,000 ms
コード長 392 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 78,916 KB
実行使用メモリ 57,768 KB
最終ジャッジ日時 2023-10-21 13:17:35
合計ジャッジ時間 6,291 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
57,632 KB
testcase_01 AC 128 ms
57,388 KB
testcase_02 AC 129 ms
57,388 KB
testcase_03 AC 138 ms
57,488 KB
testcase_04 AC 137 ms
57,768 KB
testcase_05 AC 126 ms
57,608 KB
testcase_06 AC 124 ms
57,348 KB
testcase_07 AC 132 ms
57,356 KB
testcase_08 AC 132 ms
57,428 KB
testcase_09 AC 130 ms
57,192 KB
testcase_10 AC 128 ms
57,576 KB
testcase_11 AC 125 ms
57,544 KB
testcase_12 AC 129 ms
57,352 KB
testcase_13 AC 131 ms
57,288 KB
testcase_14 AC 131 ms
57,244 KB
testcase_15 AC 129 ms
57,552 KB
testcase_16 AC 132 ms
57,532 KB
testcase_17 AC 128 ms
57,544 KB
testcase_18 AC 125 ms
57,316 KB
testcase_19 AC 129 ms
57,300 KB
testcase_20 AC 123 ms
57,212 KB
testcase_21 AC 125 ms
57,296 KB
testcase_22 AC 134 ms
57,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class No163{
	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<c.length; i++){
			if((int)c[i]>=97 && (int)c[i]<=122){
				System.out.print(String.valueOf(c[i]).toUpperCase());
			}else{
				System.out.print(String.valueOf(c[i]).toLowerCase());
			}
		}
	}
}
0