Submission #58147


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
namespace hoj{
class HOJ {
public static void Main(string[] args) {
new HOJ().Solve(new ConsoleInput(Console.In, ' '));
}
public void Solve(ConsoleInput cin) {
int n = cin.ReadInt;
int a = cin.ReadInt;
int b = cin.ReadInt;
int c = 0;
for ( int i = 0; i < n; i++ ) {
int l = cin.ReadInt;
if ( a <= l && l <= b ) c++;
}
Console.Write(c);
Console.Write("\n");
}
}
public class ConsoleInput {
private readonly System.IO.TextReader _stream;
private char _separator = ' ';
private Queue<string> inputStream;
public ConsoleInput(System.IO.TextReader stream, char separator = ' '){
this._separator = separator;
this._stream = stream;
inputStream = new Queue<string>();
}
public string Read {
get{
if (inputStream.Count != 0) return inputStream.Dequeue();
string[] tmp = _stream.ReadLine().Split(_separator);
for (int i = 0; i < tmp.Length; i++)
inputStream.Enqueue(tmp[i]);
return inputStream.Dequeue();
}
}
public string ReadLine { get { return _stream.ReadLine(); }}
public int ReadInt { get { return int.Parse(Read); }}
public long ReadLong { get { return long.Parse(Read); }}
public double ReadDouble { get { return double.Parse(Read); }}
public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; i++) ret[i] = Read; return ret;}
public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; i++) ret[i] = ReadInt; return ret;}
public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; i++) ret[i] = ReadLong; return ret;}
}
}

ステータス

項目 データ
問題 1246 - わんこ、わわんこ、わわわんこ
ユーザー名 r1825
投稿日時 2020-01-15 16:01:51
言語 C#
状態 Accepted
得点 10
ソースコード長 2173 Byte
最大実行時間 79 ms
最大メモリ使用量 11320 KB

セット

セット 得点 Cases
1 ALL 10 / 10 in*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 47 ms 11100 KB
1
in02.txt AC 46 ms 8956 KB
1
in03.txt AC 45 ms 9124 KB
1
in04.txt AC 46 ms 9212 KB
1
in05.txt AC 49 ms 11296 KB
1
in06.txt AC 45 ms 8988 KB
1
in07.txt AC 50 ms 9236 KB
1
in08.txt AC 47 ms 11032 KB
1
in09.txt AC 53 ms 11068 KB
1
in10.txt AC 39 ms 7104 KB
1
in11.txt AC 49 ms 9204 KB
1
in12.txt AC 45 ms 9032 KB
1
in13.txt AC 53 ms 9108 KB
1
in14.txt AC 47 ms 9108 KB
1
in15.txt AC 47 ms 9216 KB
1
in16.txt AC 44 ms 9180 KB
1
in17.txt AC 79 ms 9224 KB
1
in18.txt AC 44 ms 9208 KB
1
in19.txt AC 49 ms 11196 KB
1
in20.txt AC 45 ms 11288 KB
1
in21.txt AC 46 ms 9328 KB
1
in22.txt AC 50 ms 11320 KB
1
in23.txt AC 48 ms 9092 KB
1
in24.txt AC 51 ms 9160 KB
1
sample01.txt AC 43 ms 7052 KB
sample02.txt AC 50 ms 9160 KB