結果
| 問題 | No.734 Careful Engineer | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-09-28 23:39:55 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 389 bytes | 
| コンパイル時間 | 138 ms | 
| コンパイル使用メモリ | 27,136 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2025-01-18 00:04:58 | 
| 合計ジャッジ時間 | 819 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 10 WA * 1 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%lld %lld %lld",&A,&B,&C);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
typedef long long ll;
ll myceil(ll a, ll b){
        if(a%b==0) return a/b;
        else return a/b+1;
}
int main(){
        ll A,B,C;
        scanf("%lld %lld %lld",&A,&B,&C);
        if(60*A == B){
                puts("0");
        }else if(60*A < B){
                printf("-1");
        }else{
                printf("%lld\n",myceil(60*60*C,60*A-B));
        }
}
            
            
            
        