結果
問題 |
No.9003 小数誤差テスト(テスト用)
|
ユーザー |
![]() |
提出日時 | 2015-05-22 03:56:35 |
言語 | Java (openjdk 23) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 570 bytes |
コンパイル時間 | 3,595 ms |
コンパイル使用メモリ | 74,796 KB |
実行使用メモリ | 41,280 KB |
最終ジャッジ日時 | 2024-07-06 16:05:16 |
合計ジャッジ時間 | 4,264 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 1 |
ソースコード
import java.util.Scanner; public class test9002 { public static void main(String[] args) { Scanner userInput = new Scanner(System.in); String inputStr = userInput.next(); boolean result = isNumber(inputStr); userInput.close(); if(result == true){ System.out.println("decimal"); System.out.println(Integer.parseInt(inputStr) + 0.0001); } } static boolean isNumber(String num) { try { Integer.parseInt(num); return true; } catch (NumberFormatException e) { return false; } } }