結果

問題 No.56 消費税
ユーザー Hissha_
提出日時 2018-03-30 14:30:28
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 165 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 28,544 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 00:28:13
合計ジャッジ時間 1,022 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 13 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:9:29: warning: implicit declaration of function 'floor' [-Wimplicit-function-declaration]
    9 |         printf("%d\n", (int)floor(d*(1.0+p/100.0)));
      |                             ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'floor'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:9:29: warning: incompatible implicit declaration of built-in function 'floor' [-Wbuiltin-declaration-mismatch]
    9 |         printf("%d\n", (int)floor(d*(1.0+p/100.0)));
      |                             ^~~~~
main.c:9:29: note: include '<math.h>' or provide a declaration of 'floor'

ソースコード

diff #

#include <stdio.h>

int main(void) {
	// your code goes here
	double d, p;

	scanf("%lf %lf",&d, &p);
	
	printf("%d\n", (int)floor(d*(1.0+p/100.0)));
	
	return 0;
}
0