結果

問題 No.56 消費税
コンテスト
ユーザー Hissha_
提出日時 2018-03-30 14:30:28
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
WA  
実行時間 -
コード長 165 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 267 ms
コンパイル使用メモリ 35,968 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-21 19:42:15
合計ジャッジ時間 1,882 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 #
raw source code

#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