結果
| 問題 |
No.734 Careful Engineer
|
| コンテスト | |
| ユーザー |
greentea011
|
| 提出日時 | 2018-10-04 10:30:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 303 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 34,816 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-18 00:05:47 |
| 合計ジャッジ時間 | 775 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 10 WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%lf %lf %lf", &a, &b, &c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <math.h>
int main() {
double a,b,c;
scanf("%lf %lf %lf", &a, &b, &c);
a*=60;
c*=3600;
double x = c / (a-b);
long ans;
if (x < 0) {
ans = -1;
}
else {
ans = (long) ceil(x);
}
printf("%ld\n", ans);
return 0;
}
greentea011