結果
| 問題 |
No.810 割った余りの個数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-06-30 19:19:53 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 731 ms |
| コンパイル使用メモリ | 70,320 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-06 12:56:51 |
| 合計ジャッジ時間 | 6,002 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 30 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
int l,r,m,a[1000000010]={0},cnt,ans=0;
cin >> l >> r >> m;
for(int i=l; i<=r; i++) {
cnt=i%m;
a[cnt]++;
if(a[cnt]==1) {
ans++;
}
}
cout << ans << endl;
}