結果
問題 |
No.285 消費税2
|
ユーザー |
![]() |
提出日時 | 2015-10-17 10:12:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 100 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 23,808 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 10:04:39 |
合計ジャッジ時間 | 1,098 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 26 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:3:25: warning: format ‘%lf’ expects argument of type ‘double*’, but argument 2 has type ‘long double*’ [-Wformat=] 3 | long double d; scanf("%lf", &d); | ~~^ ~~ | | | | | long double* | double* | %Lf main.cpp:4:10: warning: format ‘%g’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=] 4 | printf("%g\n", d*1.08); | ~^ ~~~~~~ | | | | double long double | %Lg main.cpp:3:21: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 3 | long double d; scanf("%lf", &d); | ~~~~~^~~~~~~~~~~
ソースコード
#include <stdio.h> int main() { long double d; scanf("%lf", &d); printf("%g\n", d*1.08); return 0; }