結果

問題 No.756 チャンパーノウン定数 (1)
ユーザー Ryota EnokidoRyota Enokido
提出日時 2018-12-11 23:57:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 3,527 ms
コンパイル使用メモリ 74,060 KB
実行使用メモリ 57,792 KB
最終ジャッジ日時 2023-10-24 22:27:30
合計ジャッジ時間 7,331 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,236 KB
testcase_01 AC 120 ms
55,484 KB
testcase_02 AC 120 ms
57,560 KB
testcase_03 AC 121 ms
57,724 KB
testcase_04 AC 119 ms
57,608 KB
testcase_05 AC 118 ms
57,444 KB
testcase_06 AC 119 ms
57,512 KB
testcase_07 AC 122 ms
57,520 KB
testcase_08 AC 109 ms
56,332 KB
testcase_09 AC 109 ms
56,316 KB
testcase_10 AC 110 ms
56,324 KB
testcase_11 AC 109 ms
56,328 KB
testcase_12 AC 119 ms
57,412 KB
testcase_13 AC 121 ms
57,252 KB
testcase_14 AC 109 ms
56,428 KB
testcase_15 AC 123 ms
57,592 KB
testcase_16 AC 123 ms
57,792 KB
testcase_17 AC 126 ms
57,596 KB
testcase_18 AC 123 ms
57,552 KB
testcase_19 AC 121 ms
57,264 KB
testcase_20 AC 120 ms
57,568 KB
testcase_21 AC 119 ms
57,364 KB
testcase_22 AC 119 ms
57,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
  
    public class Main {
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            
            int d = sc.nextInt();
            if(d<=9){
                System.out.println(d);
            }else if(d>9 && d%2==0){
                System.out.println((d+10)/20);
            }else{
                System.out.println(((d+9)/2)%10);
            }
        }
    }
0