結果
| 問題 |
No.734 Careful Engineer
|
| コンテスト | |
| ユーザー |
greentea011
|
| 提出日時 | 2018-10-04 10:16:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 185 bytes |
| コンパイル時間 | 394 ms |
| コンパイル使用メモリ | 31,360 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 11:12:17 |
| 合計ジャッジ時間 | 986 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | AC * 2 WA * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:14: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 2 has type ‘double*’ [-Wformat=]
6 | scanf("%ld %ld %ld", &a, &b, &c);
| ~~^ ~~
| | |
| long int* double*
| %le
main.cpp:6:18: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 3 has type ‘double*’ [-Wformat=]
6 | scanf("%ld %ld %ld", &a, &b, &c);
| ~~^ ~~
| | |
| long int* double*
| %le
main.cpp:6:22: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 4 has type ‘double*’ [-Wformat=]
6 | scanf("%ld %ld %ld", &a, &b, &c);
| ~~^ ~~
| | |
| long int* double*
| %le
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%ld %ld %ld", &a, &b, &c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <math.h>
int main() {
double a,b,c;
scanf("%ld %ld %ld", &a, &b, &c);
double x = c / (a-b);
printf("%d\n", (int) ceil(x));
return 0;
}
greentea011