結果

問題 No.285 消費税2
ユーザー square1001
提出日時 2016-10-31 12:30:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 1,819 ms
コンパイル使用メモリ 168,992 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 00:02:30
合計ジャッジ時間 2,222 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
string func(int x, int l) {
	string s = to_string(x);
	while(s.size() < l) s = '0' + s;
	return s;
}
long long x;
int main() {
	cin >> x;
	long long q = x * 8;
	x += q / 100, q %= 100;
	cout << x << '.' << func(q, 2) << endl;
	return 0;
}
0