結果

問題 No.56 消費税
ユーザー tntantntan
提出日時 2015-12-15 06:44:34
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 328 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 63,128 KB
最終ジャッジ日時 2023-09-25 03:17:15
合計ジャッジ時間 840 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:6: error: ‘floor’ was not declared in this scope
  q = floor(d*(p / 100));
      ^~~~~
main.cpp:16:6: note: suggested alternative: ‘float’
  q = floor(d*(p / 100));
      ^~~~~
      float

ソースコード

diff #

#include<iostream>
#include<string>
#include<fstream>
#include<iomanip>
#include<vector>
#include<cctype>
#include<algorithm>
#include<sstream>
using namespace std;

int main()
{
	double d, p, q;
	long long a, b;
	cin >> d >> p;
	q = floor(d*(p / 100));
	a = (long long)d;
	b = (long long)q;
	cout << a + b << endl;
	return 0;
}
0