結果

問題 No.285 消費税2
コンテスト
ユーザー kichirb3
提出日時 2018-03-04 17:28:17
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 456 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 517 ms
コンパイル使用メモリ 80,880 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2026-03-30 00:18:57
合計ジャッジ時間 5,592 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

// No.285 消費税2
// https://yukicoder.me/problems/no/285
//
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
using namespace std;

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    long double D;
    cin >> D;

    stringstream ss;
    ss << fixed << setprecision(20) << D * 1.08 << endl;
    string ans = ss.str();
    auto pos = ans.find('.');
    cout << ans.substr(0, pos+3) << endl;
}
0