Submission #52957


ソースコード

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
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define int long long
#define mk_p(a,b) make_pair((a),(b))
using pii = pair<int,int>;
constexpr int INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
int gcd(int a,int b){return b ? gcd(b,a%b) : a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
signed main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
int a = 0,b = 0,c = 0,d = 0,x;
rep(i,n){
cin >> x;
if(x == 2) a++;
else if(x == 0) b++;
else if(x == 1) c++;
else if(x == 9) d++;
}
cout << a * b * c * d << '\n';
return 0;
}

ステータス

項目 データ
問題 1143 - 2019
ユーザー名 ei1903
投稿日時 2019-08-20 02:19:57
言語 C++14
状態 Accepted
得点 3
ソースコード長 884 Byte
最大実行時間 28 ms
最大メモリ使用量 748 KB

セット

セット 得点 Cases
1 small 2 / 2 01*, 02*, 03*, 04*
2 hard 1 / 1 01*, 02*, 03*, 04*, 05*, 06*, 07*

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01_sample_01.in AC 27 ms 604 KB
1
2
01_sample_02.in AC 17 ms 428 KB
1
2
01_sample_03.in AC 25 ms 516 KB
1
2
02_small_random_01.in AC 19 ms 472 KB
1
2
02_small_random_02.in AC 19 ms 560 KB
1
2
02_small_random_03.in AC 22 ms 388 KB
1
2
02_small_random_04.in AC 27 ms 472 KB
1
2
02_small_random_05.in AC 14 ms 552 KB
1
2
03_small_2019_01.in AC 20 ms 500 KB
1
2
03_small_2019_02.in AC 21 ms 588 KB
1
2
03_small_2019_03.in AC 24 ms 672 KB
1
2
03_small_2019_04.in AC 20 ms 628 KB
1
2
03_small_2019_05.in AC 24 ms 708 KB
1
2
04_corner_01.in AC 23 ms 660 KB
1
2
04_corner_02.in AC 20 ms 492 KB
1
2
04_corner_03.in AC 27 ms 444 KB
1
2
04_corner_04.in AC 23 ms 660 KB
1
2
04_corner_05.in AC 21 ms 616 KB
1
2
05_hard_random_01.in AC 25 ms 568 KB
2
05_hard_random_02.in AC 24 ms 648 KB
2
05_hard_random_03.in AC 25 ms 472 KB
2
05_hard_random_04.in AC 25 ms 544 KB
2
05_hard_random_05.in AC 23 ms 748 KB
2
06_hard_2019_01.in AC 28 ms 700 KB
2
06_hard_2019_02.in AC 26 ms 524 KB
2
06_hard_2019_03.in AC 25 ms 604 KB
2
06_hard_2019_04.in AC 23 ms 688 KB
2
06_hard_2019_05.in AC 28 ms 636 KB
2
07_max.in AC 20 ms 592 KB
2