結果
問題 |
No.46 はじめのn歩
|
ユーザー |
![]() |
提出日時 | 2018-09-14 20:49:50 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 273 bytes |
コンパイル時間 | 338 ms |
コンパイル使用メモリ | 30,336 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 05:38:44 |
合計ジャッジ時間 | 690 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d%d",&vel,&dis); | ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main() { int vel; int dis; double step; scanf("%d%d",&vel,&dis); if(dis%vel==0){ step=dis/vel; } else{ step=floor(dis/vel)+1; } printf("%d\n",int(step)); return 0; }