結果

問題 No.163 cAPSlOCK
ユーザー kou6839kou6839
提出日時 2015-03-13 00:14:14
言語 Java19
(openjdk 21)
結果
AC  
実行時間 167 ms / 5,000 ms
コード長 442 bytes
コンパイル時間 2,297 ms
コンパイル使用メモリ 88,292 KB
実行使用メモリ 57,248 KB
最終ジャッジ日時 2023-09-11 08:08:42
合計ジャッジ時間 7,337 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 158 ms
56,832 KB
testcase_01 AC 160 ms
57,212 KB
testcase_02 AC 156 ms
56,736 KB
testcase_03 AC 161 ms
57,012 KB
testcase_04 AC 162 ms
56,700 KB
testcase_05 AC 162 ms
56,728 KB
testcase_06 AC 164 ms
56,632 KB
testcase_07 AC 164 ms
56,716 KB
testcase_08 AC 164 ms
56,732 KB
testcase_09 AC 164 ms
56,648 KB
testcase_10 AC 163 ms
56,492 KB
testcase_11 AC 156 ms
56,948 KB
testcase_12 AC 157 ms
57,248 KB
testcase_13 AC 165 ms
56,984 KB
testcase_14 AC 167 ms
56,884 KB
testcase_15 AC 162 ms
54,804 KB
testcase_16 AC 163 ms
56,916 KB
testcase_17 AC 164 ms
56,924 KB
testcase_18 AC 152 ms
56,616 KB
testcase_19 AC 153 ms
56,952 KB
testcase_20 AC 155 ms
56,868 KB
testcase_21 AC 153 ms
56,584 KB
testcase_22 AC 155 ms
56,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.beans.IntrospectionException;
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.next();
		String ans = "";
		for(int i=0;i<string.length();i++){
			if(Character.isUpperCase(string.charAt(i))){
				ans+=Character.toLowerCase(string.charAt(i));
			}else{
				ans+=Character.toUpperCase(string.charAt(i));
			}
		}
		System.out.println(ans);
	}
}
0