結果

問題 No.810 割った余りの個数
ユーザー funakoshifunakoshi
提出日時 2019-08-29 09:33:32
言語 C
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 471 bytes
コンパイル時間 629 ms
コンパイル使用メモリ 31,872 KB
実行使用メモリ 80,000 KB
最終ジャッジ日時 2024-04-28 20:59:09
合計ジャッジ時間 8,233 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
79,792 KB
testcase_01 AC 51 ms
80,000 KB
testcase_02 AC 51 ms
79,784 KB
testcase_03 AC 50 ms
79,940 KB
testcase_04 AC 51 ms
79,788 KB
testcase_05 AC 52 ms
80,000 KB
testcase_06 AC 52 ms
79,780 KB
testcase_07 AC 51 ms
79,956 KB
testcase_08 AC 52 ms
79,992 KB
testcase_09 AC 52 ms
80,000 KB
testcase_10 AC 53 ms
79,972 KB
testcase_11 AC 51 ms
79,948 KB
testcase_12 AC 50 ms
79,932 KB
testcase_13 AC 51 ms
79,992 KB
testcase_14 AC 50 ms
79,968 KB
testcase_15 AC 51 ms
79,944 KB
testcase_16 AC 52 ms
79,840 KB
testcase_17 AC 51 ms
80,000 KB
testcase_18 AC 51 ms
79,784 KB
testcase_19 AC 51 ms
80,000 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 WA -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
int main(void)
{
    long long int left,right,mod,surplus,cnt=0;
    int numofmod[20000000]={0};
    scanf("%lld %lld %lld",&left,&right,&mod);
    for(int i=left;i<=right;i++)
    {
        surplus=i%mod;
        numofmod[surplus]++;
    }
    for(int i=0;i<100000;i++)
    {
        if(numofmod[i]>0)
        {
            cnt++;
        }
    }
    printf("%lld",cnt);
}
0