提出 #76708219
ソースコード 拡げる
#include <stdio.h>
int main(void) {
int n;
scanf("%d",&n);
int A[n];
for(int i=0;i<n;i++) {
scanf("%d",A+i);
}
for(int i=0;i<n-1;i++) {
printf("%s%d",(i==0) ? "" : " ",A[i]*A[i+1]);
}
printf("\n");
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Adjacent Product |
| ユーザ | hide0323 |
| 言語 | C23 (GCC 14.2.0) |
| 得点 | 100 |
| コード長 | 254 Byte |
| 結果 | AC |
| 実行時間 | 0 ms |
| メモリ | 1616 KiB |
コンパイルエラー
Main.c: In function ‘main’:
Main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
Main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d",A+i);
| ^~~~~~~~~~~~~~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 02_minmax_00.txt, 02_minmax_01.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 00_sample_00.txt | AC | 0 ms | 1600 KiB |
| 00_sample_01.txt | AC | 0 ms | 1484 KiB |
| 01_random_00.txt | AC | 0 ms | 1524 KiB |
| 01_random_01.txt | AC | 0 ms | 1608 KiB |
| 01_random_02.txt | AC | 0 ms | 1584 KiB |
| 01_random_03.txt | AC | 0 ms | 1540 KiB |
| 01_random_04.txt | AC | 0 ms | 1608 KiB |
| 01_random_05.txt | AC | 0 ms | 1444 KiB |
| 01_random_06.txt | AC | 0 ms | 1580 KiB |
| 02_minmax_00.txt | AC | 0 ms | 1608 KiB |
| 02_minmax_01.txt | AC | 0 ms | 1616 KiB |