結果

問題 No.163 cAPSlOCK
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-06 10:31:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 516 bytes
コンパイル時間 3,042 ms
コンパイル使用メモリ 71,388 KB
実行使用メモリ 56,004 KB
最終ジャッジ日時 2023-09-17 06:10:12
合計ジャッジ時間 6,509 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
56,004 KB
testcase_01 AC 99 ms
55,568 KB
testcase_02 AC 100 ms
55,488 KB
testcase_03 AC 99 ms
55,384 KB
testcase_04 AC 99 ms
55,856 KB
testcase_05 AC 103 ms
55,540 KB
testcase_06 AC 101 ms
55,556 KB
testcase_07 AC 97 ms
55,664 KB
testcase_08 AC 110 ms
56,000 KB
testcase_09 AC 104 ms
55,716 KB
testcase_10 AC 98 ms
55,508 KB
testcase_11 AC 99 ms
55,900 KB
testcase_12 AC 103 ms
55,360 KB
testcase_13 AC 112 ms
55,708 KB
testcase_14 AC 107 ms
55,396 KB
testcase_15 AC 99 ms
55,484 KB
testcase_16 AC 108 ms
56,004 KB
testcase_17 AC 100 ms
55,792 KB
testcase_18 AC 100 ms
55,756 KB
testcase_19 AC 104 ms
55,464 KB
testcase_20 AC 103 ms
55,720 KB
testcase_21 AC 103 ms
55,496 KB
testcase_22 AC 109 ms
55,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
       String p = koko.next();
       char[] hai = p.toCharArray();
       for(int i=0; i<hai.length; i++){
           if(Character.isUpperCase(hai[i])){
               hai[i] = Character.toLowerCase(hai[i]);
           }else{
               hai[i] = Character.toUpperCase(hai[i]);
           }
       }
       System.out.println(String.valueOf(hai));
    }
}
0