Submission #00250


ソースコード

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
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
static int a[100], b[100];
while(true){
int n, m;
int con[10] = {};
cin>>n>>m;
if(!n) break;
for(int i = 0; i < n; i++){
cin>>a[i];
}
for(int j = 0; j < m; j++){
cin>>b[j];
}
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
int Z = a[i] * b[j];
while(Z > 0){
con[Z%10]++;
Z /= 10;
}
}
}
for(int i = 0; i <10; i++){
if(i) cout<<" ";
cout<<con[i];
}
cout<<endl;
}
}

ステータス

項目 データ
問題 0004 - nmマス計算
ユーザー名 ei2215
投稿日時 2024-03-29 14:13:18
言語 C++17
状態 Accepted
得点 20
ソースコード長 618 Byte
最大実行時間 36 ms
最大メモリ使用量 604 KB

セット

セット 得点 Cases
1 ALL 20 / 20 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
A1 AC 36 ms 604 KB
1
A2 AC 27 ms 576 KB
1
A3 AC 26 ms 548 KB
1
A4 AC 28 ms 516 KB
1