結果
| 問題 |
No.285 消費税2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-29 23:15:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 647 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 88,868 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-06 09:50:07 |
| 合計ジャッジ時間 | 1,566 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 26 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:32:21: warning: format ‘%lf’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=]
32 | printf("%.2lf\n",a*1.08);
| ~~~~^ ~~~~~~
| | |
| | long double
| double
| %.2Lf
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
#define N 1000
#define re(i,n) for(int i=0;i<(n);i++)
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define fe(i,n,f) for_each(i,n,f)
#define bw(a,b,c) (((a)<=(b))&&((b)<=(c)))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int main(void){
long double a;
cin>>a;
printf("%.2lf\n",a*1.08);
return 0;
}