結果
問題 | No.810 割った余りの個数 |
ユーザー |
![]() |
提出日時 | 2019-08-29 09:33:32 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 471 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 32,128 KB |
実行使用メモリ | 80,024 KB |
最終ジャッジ日時 | 2024-11-17 16:46:47 |
合計ジャッジ時間 | 4,660 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 1 RE * 9 |
ソースコード
#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); }