結果
| 問題 |
No.8067 ドーパミン
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-27 21:24:32 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 308 bytes |
| コンパイル時間 | 1,166 ms |
| コンパイル使用メモリ | 28,928 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 14:42:27 |
| 合計ジャッジ時間 | 1,681 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
#include <stdio.h>
int n;
int a[524288];
int main(void){
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
int res = 0;
for (i = 0; i < n; i++) {
// even -> 1 -> 1
// odd -> 0 -> 0
if (a[i] % 2 == 0) res++;
}
res = (res ^ n ^ a[n - 1]);
printf("%d\n", res);
}