結果
問題 |
No.388 階段 (1)
|
ユーザー |
![]() |
提出日時 | 2018-09-14 21:11:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 240 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 30,464 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-06 06:12:44 |
合計ジャッジ時間 | 2,378 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 12 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:9:15: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘double*’ [-Wformat=] 9 | scanf("%d%d",&sqstep,&relstep); | ~^ ~~~~~~~~ | | | | int* double* | %le main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d%d",&sqstep,&relstep); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:11:18: warning: ‘relsta’ is used uninitialized [-Wuninitialized] 11 | relstep=floor(sqstep/relsta)+1; | ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> int main() { int relsta; int sqstep; double relstep; scanf("%d%d",&sqstep,&relstep); relstep=floor(sqstep/relsta)+1; printf("%d",(int)relstep); return 0; }