提出 #76727694
ソースコード 拡げる
#include <stdio.h>
#define DAYS 7
int main(void){
int n;
scanf("%d", &n);
int InputArray[n*7];
for(int i = 0; i < n*7; i++){
scanf("%d", &InputArray[i]);
}
int OutputArray[100] = {0};
for(int i = 0; i < n; i++){
for(int j = 0; j < DAYS; j++){
OutputArray[i] += InputArray[7*i +j];
}
}
for(int i = 0; i < n; i++){
printf("%d ", OutputArray[i]);
}
printf("\n");
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Weekly Records |
| ユーザ | os9392 |
| 言語 | C23 (GCC 14.2.0) |
| 得点 | 100 |
| コード長 | 499 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 1764 KiB |
コンパイルエラー
Main.c: In function ‘main’:
Main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
Main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%d", &InputArray[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| random_01.txt | AC | 1 ms | 1732 KiB |
| random_02.txt | AC | 0 ms | 1520 KiB |
| random_03.txt | AC | 0 ms | 1764 KiB |
| random_04.txt | AC | 0 ms | 1604 KiB |
| random_05.txt | AC | 0 ms | 1572 KiB |
| random_06.txt | AC | 0 ms | 1616 KiB |
| random_07.txt | AC | 0 ms | 1572 KiB |
| random_08.txt | AC | 0 ms | 1572 KiB |
| sample_01.txt | AC | 0 ms | 1612 KiB |
| sample_02.txt | AC | 0 ms | 1592 KiB |