結果
| 問題 |
No.1828 Except 3
|
| ユーザー |
tnakao0123
|
| 提出日時 | 2022-02-02 20:22:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 544 bytes |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 40,900 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 09:35:05 |
| 合計ジャッジ時間 | 1,143 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 16 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 1828.cc: No.1828 Except 3 - yukicoder
*/
#include<cstdio>
#include<algorithm>
using namespace std;
/* constant */
const int MAX_N = 10000;
const int M = 3;
/* typedef */
typedef long long ll;
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
scanf("%d", &n);
ll p = 1;
for (int i = 0; i < M; i++) {
int c = 0;
for (int j = 0; j < n; j++) {
int ai;
scanf("%d", &ai);
if (ai % 3) c++;
}
p *= c;
}
printf("%lld\n", p);
return 0;
}
tnakao0123