結果

問題 No.163 cAPSlOCK
ユーザー 🐧しゅんチャマ🌸🐧しゅんチャマ🌸
提出日時 2023-09-13 23:22:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 164 ms / 5,000 ms
コード長 471 bytes
コンパイル時間 3,014 ms
コンパイル使用メモリ 73,676 KB
実行使用メモリ 57,216 KB
最終ジャッジ日時 2023-09-13 23:23:14
合計ジャッジ時間 8,214 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 161 ms
56,664 KB
testcase_01 AC 159 ms
56,788 KB
testcase_02 AC 157 ms
56,824 KB
testcase_03 AC 163 ms
57,004 KB
testcase_04 AC 160 ms
56,936 KB
testcase_05 AC 162 ms
56,568 KB
testcase_06 AC 158 ms
56,624 KB
testcase_07 AC 161 ms
56,832 KB
testcase_08 AC 159 ms
56,884 KB
testcase_09 AC 157 ms
56,980 KB
testcase_10 AC 159 ms
56,840 KB
testcase_11 AC 159 ms
56,796 KB
testcase_12 AC 161 ms
54,672 KB
testcase_13 AC 162 ms
56,676 KB
testcase_14 AC 159 ms
56,856 KB
testcase_15 AC 161 ms
56,972 KB
testcase_16 AC 160 ms
57,216 KB
testcase_17 AC 161 ms
57,140 KB
testcase_18 AC 159 ms
56,512 KB
testcase_19 AC 159 ms
56,728 KB
testcase_20 AC 158 ms
56,880 KB
testcase_21 AC 162 ms
56,832 KB
testcase_22 AC 164 ms
56,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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