結果
問題 |
No.285 消費税2
|
ユーザー |
![]() |
提出日時 | 2025-03-17 15:00:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 137 bytes |
コンパイル時間 | 480 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-17 15:00:42 |
合計ジャッジ時間 | 1,870 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 26 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:4:18: warning: format ‘%lf’ expects argument of type ‘double*’, but argument 2 has type ‘long double*’ [-Wformat=] 4 | scanf("%lf",&val); | ~~^ ~~~~ | | | | | long double* | double* | %Lf main.cpp:7:19: warning: format ‘%lf’ expects argument of type ‘double’, but argument 2 has type ‘long double’ [-Wformat=] 7 | printf("%lf",val + tax); | ~~^ ~~~~~~~~~ | | | | double long double | %Lf main.cpp:4:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%lf",&val); | ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ long double val = 0; scanf("%lf",&val); long double tax = val * 0.08; printf("%lf",val + tax); }