結果

問題 No.2259 Gas Station
ユーザー takosannntakosannn
提出日時 2023-04-17 22:37:08
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 714 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 30,336 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 00:24:47
合計ジャッジ時間 12,112 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
5,376 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 1 ms
5,376 KB
testcase_11 WA -
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1,965 ms
5,376 KB
testcase_14 AC 1,941 ms
5,376 KB
testcase_15 AC 1,942 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 1,824 ms
5,376 KB
testcase_20 AC 1,335 ms
5,376 KB
testcase_21 AC 170 ms
5,376 KB
testcase_22 AC 130 ms
5,376 KB
testcase_23 AC 499 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:6:5: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration]
    6 |     srand(time(NULL));
      |     ^~~~~
main.c:6:11: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
    6 |     srand(time(NULL));
      |           ^~~~
main.c:2:1: note: 'time' is defined in header '<time.h>'; did you forget to '#include <time.h>'?
    1 | #include<stdio.h>
  +++ |+#include <time.h>
    2 | //#include<time.h>

ソースコード

diff #

#include<stdio.h>
//#include<time.h>
//#include<stdlib.h>

int main(void){
    srand(time(NULL));

    int L,R,C,x;
    int oturi,min;
    //int second;

    scanf("%lld %lld %lld",&L,&R,&C);

    min = 999;

    //while(second < 2){
        //second = time(NULL);

        //L = rand();
        //R = rand();
        //C = rand();

        for(x = L;x <= R;x++){
            oturi = ((1000 - ((x*C) % 1000)) % 1000);

            if(oturi < min){
                min = oturi;
            }
        }

        //printf("L:%d R:%d C:%d\n",L,R,C);
        printf("%d\n",min);

        //second = time(NULL) - second;
        //printf("経過時間:%d\n",second);
    
        //printf("\n");
    //}

    return 0;
}
0