結果
| 問題 |
No.285 消費税2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-09 22:46:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 978 bytes |
| コンパイル時間 | 666 ms |
| コンパイル使用メモリ | 87,316 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-20 04:23:22 |
| 合計ジャッジ時間 | 1,438 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | WA * 26 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <string>
#include <sstream>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define var auto
#define mod 1000000007
typedef long long ll;
using namespace std;
int inputValue(){
int a;
cin >> a;
return a;
}
template <typename T>
void output(T a, int precision) {
if(precision > 0){
cout << fixed << setprecision(precision) << a << "\n";
}
else{
cout << a << "\n";
}
}
// end of template
int main() {
// source code
ll n;
cin >> n;
n *= 108;
stringstream s;
s << n;
string str = s.str();
string str1 = str.substr(0, str.size() - 2);
string str2 = str.substr(str.size() - 3, 2);
output(str1 + "." + str2, 0);
return 0;
}