結果
| 問題 |
No.836 じょうよ
|
| コンテスト | |
| ユーザー |
funakoshi
|
| 提出日時 | 2019-09-05 11:14:13 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 440 bytes |
| コンパイル時間 | 439 ms |
| コンパイル使用メモリ | 27,648 KB |
| 実行使用メモリ | 16,328 KB |
| 最終ジャッジ日時 | 2025-01-03 02:10:08 |
| 合計ジャッジ時間 | 54,576 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 10 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",ans[i]);
}
}
}
funakoshi