結果

問題 No.285 消費税2
ユーザー crazybbb3crazybbb3
提出日時 2016-11-28 23:20:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 1,784 bytes
コンパイル時間 2,397 ms
コンパイル使用メモリ 75,444 KB
実行使用メモリ 54,856 KB
最終ジャッジ日時 2023-08-18 08:57:15
合計ジャッジ時間 6,308 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
51,544 KB
testcase_01 AC 88 ms
52,928 KB
testcase_02 AC 90 ms
51,808 KB
testcase_03 AC 93 ms
53,612 KB
testcase_04 AC 90 ms
52,640 KB
testcase_05 AC 90 ms
51,720 KB
testcase_06 AC 89 ms
52,680 KB
testcase_07 AC 84 ms
52,832 KB
testcase_08 AC 83 ms
52,856 KB
testcase_09 AC 81 ms
52,828 KB
testcase_10 AC 91 ms
52,380 KB
testcase_11 AC 91 ms
52,960 KB
testcase_12 AC 84 ms
52,640 KB
testcase_13 AC 82 ms
52,940 KB
testcase_14 AC 82 ms
52,608 KB
testcase_15 AC 79 ms
54,856 KB
testcase_16 AC 83 ms
52,936 KB
testcase_17 AC 82 ms
52,624 KB
testcase_18 AC 83 ms
52,648 KB
testcase_19 AC 79 ms
52,844 KB
testcase_20 AC 85 ms
52,824 KB
testcase_21 AC 86 ms
50,304 KB
testcase_22 AC 88 ms
53,164 KB
testcase_23 AC 88 ms
53,876 KB
testcase_24 AC 82 ms
53,668 KB
testcase_25 AC 84 ms
53,856 KB
testcase_26 AC 91 ms
51,344 KB
testcase_27 AC 84 ms
52,772 KB
testcase_28 AC 82 ms
52,632 KB
testcase_29 AC 79 ms
52,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

    static BufferedReader in;
    static PrintWriter out;
    static StringTokenizer tok;

    void solve() throws IOException {
        long d = nl();
        d *= 108;
        String s = String.valueOf(d);
        out.println(s.substring(0, s.length() - 2) + "." + s.substring(s.length() - 2, s.length()));
    }

    String ns() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine(), " ");
        }
        return tok.nextToken();
    }

    int ni() throws IOException {
        return Integer.parseInt(ns());
    }

    long nl() throws IOException {
        return Long.parseLong(ns());
    }

    double nd() throws IOException {
        return Double.parseDouble(ns());
    }

    String[] nsa(int n) throws IOException {
        String[] res = new String[n];
        for (int i = 0; i < n; i++) {
            res[i] = ns();
        }
        return res;
    }

    int[] nia(int n) throws IOException {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = ni();
        }
        return res;
    }

    long[] nla(int n) throws IOException {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = nl();
        }
        return res;
    }

    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        tok = new StringTokenizer("");
        Main main = new Main();
        main.solve();
        out.close();
    }
}
0