結果
問題 | No.810 割った余りの個数 |
ユーザー | funakoshi |
提出日時 | 2019-08-29 09:33:56 |
言語 | C (gcc 12.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 395 ms |
コンパイル使用メモリ | 32,256 KB |
実行使用メモリ | 784,840 KB |
最終ジャッジ日時 | 2024-04-28 20:59:44 |
合計ジャッジ時間 | 8,422 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | MLE | - |
testcase_01 | AC | 185 ms
392,392 KB |
testcase_02 | AC | 183 ms
392,440 KB |
testcase_03 | AC | 184 ms
392,448 KB |
testcase_04 | AC | 184 ms
392,388 KB |
testcase_05 | AC | 185 ms
392,520 KB |
testcase_06 | AC | 185 ms
392,432 KB |
testcase_07 | AC | 184 ms
392,444 KB |
testcase_08 | AC | 184 ms
392,428 KB |
testcase_09 | AC | 186 ms
392,428 KB |
testcase_10 | AC | 184 ms
392,500 KB |
testcase_11 | AC | 186 ms
392,408 KB |
testcase_12 | AC | 184 ms
392,492 KB |
testcase_13 | AC | 188 ms
392,444 KB |
testcase_14 | AC | 184 ms
392,412 KB |
testcase_15 | AC | 185 ms
392,460 KB |
testcase_16 | AC | 188 ms
392,504 KB |
testcase_17 | AC | 186 ms
392,408 KB |
testcase_18 | AC | 186 ms
392,428 KB |
testcase_19 | AC | 188 ms
392,520 KB |
testcase_20 | TLE | - |
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[100000000]={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); }