結果
| 問題 |
No.810 割った余りの個数
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-08-29 09:32:13 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 469 bytes |
| コンパイル時間 | 568 ms |
| コンパイル使用メモリ | 31,744 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 16:45:28 |
| 合計ジャッジ時間 | 2,973 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 RE * 10 |
ソースコード
#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[100000]={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);
}
funakoshi