提出 #908375
ソースコード 拡げる
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int main()
{
int n,a,b;
scanf("%d%d%d",&n,&a,&b);
int i,j,ans=0;
for(i=0;i<n;i++)
{
scanf("%d",&j);
if(j<a||j>=b)ans++;
}
printf("%d\n",ans);
}
提出情報
コンパイルエラー
./Main.cpp: In function ‘int main()’:
./Main.cpp:9:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&n,&a,&b);
^
./Main.cpp:13:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&j);
^
ジャッジ結果
| セット名 | All | ||
|---|---|---|---|
| 得点 / 配点 | 66 / 66 | ||
| 結果 |
|
| セット名 | テストケース |
|---|---|
| All | 00_sample.txt, 01_sample.txt, 02_sampe.txt, 03_sample.txt, corner_case_03.txt, corner_case_04.txt, random_case_00.txt, random_case_01.txt, random_case_02.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample.txt | AC | 1 ms | 128 KiB |
| 01_sample.txt | AC | 1 ms | 128 KiB |
| 02_sampe.txt | AC | 1 ms | 128 KiB |
| 03_sample.txt | AC | 1 ms | 128 KiB |
| corner_case_03.txt | AC | 1 ms | 128 KiB |
| corner_case_04.txt | AC | 1 ms | 128 KiB |
| random_case_00.txt | AC | 1 ms | 128 KiB |
| random_case_01.txt | AC | 1 ms | 128 KiB |
| random_case_02.txt | AC | 1 ms | 128 KiB |