結果

問題 No.46 はじめのn歩
ユーザー stack9996
提出日時 2015-08-25 15:31:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 175 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 59,520 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 13:21:19
合計ジャッジ時間 859 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:19: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=]
   11 |         printf("%ld\n", (int)b);
      |                 ~~^     ~~~~~~
      |                   |     |
      |                   |     int
      |                   long int
      |                 %d

ソースコード

diff #

#include <iostream>
#include <cmath>

const double e = 1e-9;

int main(){
	double a, b;
	std::cin >> a >> b;
	b /= a;
	b = std::ceil(b);
	printf("%ld\n", (int)b);
	return 0;
}
0