結果

問題 No.163 cAPSlOCK
ユーザー DemocoDemoco
提出日時 2015-05-02 13:25:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 169 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 3,375 ms
コンパイル使用メモリ 74,840 KB
実行使用メモリ 58,740 KB
最終ジャッジ日時 2023-09-19 04:59:21
合計ジャッジ時間 8,516 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 166 ms
56,880 KB
testcase_01 AC 163 ms
56,468 KB
testcase_02 AC 163 ms
56,568 KB
testcase_03 AC 169 ms
56,864 KB
testcase_04 AC 167 ms
56,632 KB
testcase_05 AC 163 ms
58,532 KB
testcase_06 AC 162 ms
56,712 KB
testcase_07 AC 162 ms
56,816 KB
testcase_08 AC 165 ms
56,612 KB
testcase_09 AC 162 ms
56,736 KB
testcase_10 AC 162 ms
56,952 KB
testcase_11 AC 160 ms
56,744 KB
testcase_12 AC 160 ms
56,920 KB
testcase_13 AC 160 ms
56,556 KB
testcase_14 AC 161 ms
56,568 KB
testcase_15 AC 164 ms
55,108 KB
testcase_16 AC 159 ms
56,812 KB
testcase_17 AC 158 ms
56,716 KB
testcase_18 AC 159 ms
58,740 KB
testcase_19 AC 161 ms
56,564 KB
testcase_20 AC 163 ms
56,844 KB
testcase_21 AC 161 ms
56,572 KB
testcase_22 AC 160 ms
57,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class Yukico163 {
	public static void main(String[] args) {
		Scanner stdio = new Scanner(System.in);
		String s = stdio.next();
		String ans ="";
		for(int i=0; i<s.length(); i++) {
			if(Character.isUpperCase(s.charAt(i))) {
				ans =ans+Character.toLowerCase(s.charAt(i));
			} else {
				ans =ans+Character.toUpperCase(s.charAt(i));
			}
		}
		System.out.println(ans);
	}
}
0