結果

問題 No.46 はじめのn歩
ユーザー _hogehogehoge
提出日時 2017-03-24 20:31:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 58,748 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-06 02:08:12
合計ジャッジ時間 957 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
   17 |         printf("%d\n", res);
      |                 ~^     ~~~
      |                  |     |
      |                  int   double
      |                 %f

ソースコード

diff #

#include <iostream>
#include <stdio.h>
#include <math.h>

using namespace std;

int main()
{
	double a = 0;
	double b = 0;
	double res = 0;

	cin >> a >> b;
	
	res = ceil(b / a);

	printf("%d\n", res);
	return 0;
}
0