結果
問題 | No.668 6.0*10^23 |
ユーザー | sekiya9311 |
提出日時 | 2018-03-23 23:10:44 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,454 bytes |
コンパイル時間 | 5,475 ms |
コンパイル使用メモリ | 75,688 KB |
実行使用メモリ | 62,792 KB |
最終ジャッジ日時 | 2023-09-12 17:35:55 |
合計ジャッジ時間 | 14,633 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 160 ms
56,980 KB |
testcase_01 | WA | - |
testcase_02 | AC | 227 ms
57,236 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 183 ms
56,480 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 157 ms
54,676 KB |
testcase_09 | AC | 160 ms
56,676 KB |
testcase_10 | AC | 187 ms
57,016 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 254 ms
60,768 KB |
testcase_14 | WA | - |
testcase_15 | AC | 177 ms
56,676 KB |
testcase_16 | AC | 181 ms
56,892 KB |
testcase_17 | WA | - |
testcase_18 | AC | 216 ms
57,356 KB |
testcase_19 | WA | - |
testcase_20 | AC | 215 ms
57,372 KB |
testcase_21 | AC | 218 ms
57,108 KB |
testcase_22 | AC | 248 ms
57,924 KB |
testcase_23 | AC | 225 ms
57,040 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 228 ms
57,060 KB |
testcase_28 | AC | 248 ms
58,064 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 222 ms
57,292 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | AC | 255 ms
60,760 KB |
testcase_38 | AC | 216 ms
57,372 KB |
testcase_39 | AC | 220 ms
57,452 KB |
testcase_40 | WA | - |
testcase_41 | AC | 238 ms
61,848 KB |
testcase_42 | AC | 213 ms
57,104 KB |
testcase_43 | WA | - |
testcase_44 | AC | 250 ms
60,104 KB |
testcase_45 | AC | 160 ms
56,860 KB |
testcase_46 | AC | 160 ms
56,984 KB |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | AC | 157 ms
56,680 KB |
ソースコード
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); No668 solver = new No668(); solver.solve(1, in, out); out.close(); } static class No668 { public void solve(int testNumber, Scanner in, PrintWriter out) { char[] N = in.next().toCharArray(); int c = 0; for (int i = N.length - 1; i > 0; i--) { N[i] += c; if (N[i] - '0' >= 5) N[i]++; if (N[i] - '0' == 10) { c = 1; } else { c = 0; } } int L = N.length - 1; if (N[1] - '0' == 10) { N[1] = '0'; N[0]++; //L++; } if (N[0] - '0' == 10) { N[1] = (char) ('0' + (N[0] - '0') % 10); N[0] = (char) ('0' + (N[0] - '0') / 10); L++; } out.println((N[0] - '0') + "." + (N[1] - '0') + "*10^" + L); } } }