結果
問題 | No.810 割った余りの個数 |
ユーザー | funakoshi |
提出日時 | 2019-08-29 09:32:58 |
言語 | C (gcc 12.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 31,872 KB |
実行使用メモリ | 790,176 KB |
最終ジャッジ日時 | 2024-04-28 20:59:00 |
合計ジャッジ時間 | 16,900 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | MLE | - |
testcase_02 | MLE | - |
testcase_03 | MLE | - |
testcase_04 | MLE | - |
testcase_05 | MLE | - |
testcase_06 | MLE | - |
testcase_07 | MLE | - |
testcase_08 | MLE | - |
testcase_09 | MLE | - |
testcase_10 | MLE | - |
testcase_11 | MLE | - |
testcase_12 | MLE | - |
testcase_13 | MLE | - |
testcase_14 | MLE | - |
testcase_15 | MLE | - |
testcase_16 | MLE | - |
testcase_17 | MLE | - |
testcase_18 | MLE | - |
testcase_19 | MLE | - |
testcase_20 | MLE | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
ソースコード
#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[200000000]={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); }