結果

問題 No.734 Careful Engineer
ユーザー Maeda
提出日時 2025-03-25 17:18:02
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 24,704 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-25 17:18:04
合計ジャッジ時間 1,412 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 WA * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d %d %d",&a,&b,&c);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

void main(void){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);

    a *= 60;
    c *= 3600;
    int count = 1;
    if(a<=b){
        printf("-1");
    }else{
        while(a*count < b*count+c){
            count++;
        }
        printf("%d",count);
    }
}
0