結果

問題 No.9003 小数誤差テスト(テスト用)
ユーザー LR_AlumisLR_Alumis
提出日時 2015-04-15 01:27:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 418 bytes
コンパイル時間 3,271 ms
コンパイル使用メモリ 72,168 KB
実行使用メモリ 56,420 KB
最終ジャッジ日時 2023-09-20 21:15:59
合計ジャッジ時間 4,337 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
55,848 KB
testcase_01 AC 135 ms
56,420 KB
testcase_02 AC 133 ms
54,144 KB
testcase_03 AC 135 ms
56,244 KB
testcase_04 AC 135 ms
56,260 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

/**
 * Created by Alumis on 2015/04/15.
 */
public class DecimalTest {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        double num = input.nextDouble();

        if(num%2==0){
            num += 0.0001;
        } else {
            num -= 0.0001;
        }

        System.out.println("decimal");
        System.out.println(num);

    }
}
0