結果
問題 |
No.810 割った余りの個数
|
ユーザー |
![]() |
提出日時 | 2019-09-04 16:51:53 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 1,564 ms |
コンパイル使用メモリ | 31,872 KB |
実行使用メモリ | 165,708 KB |
最終ジャッジ日時 | 2024-12-28 00:41:42 |
合計ジャッジ時間 | 25,068 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 27 TLE * 3 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main(void) { int l,r,m,cnt=0; scanf("%d %d %d",&l,&r,&m); int modcnt[l]; for(int i=l;i<=r;i++) { int ans = i%m; modcnt[ans]++; } for(long long int i=0;i<1000000000;i++) { if(modcnt[i]>0) { cnt++; } } printf("%d",cnt); }