結果
問題 |
No.836 じょうよ
|
ユーザー |
![]() |
提出日時 | 2019-09-05 11:14:39 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 389 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 13,312 KB |
最終ジャッジ日時 | 2025-01-03 02:14:09 |
合計ジャッジ時間 | 55,187 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 5 RE * 6 TLE * 25 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%lld %lld %lld",&left,&right,&num); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main(void) { long long int left,right,num; long long int ans[100001]={0}; scanf("%lld %lld %lld",&left,&right,&num); for(int i=left;i<=right;i++) { int mod = i%num; ans[mod]++; } for(int i=0;i<right;i++) { if(ans[i]>0) { printf("%lld\n",ans[i]); } } }