結果

問題 No.285 消費税2
ユーザー forest3
提出日時 2020-05-14 16:16:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 1,469 ms
コンパイル使用メモリ 165,032 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-15 08:44:57
合計ジャッジ時間 2,372 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	long long D;
	cin>> D;

	long long d = D * 8;
	long long x = D + d / 100;
	long long s = d % 100;
	char ans[32];
	sprintf( ans, "%lld.%02lld", x, s );

	cout << ans << endl;
}
0