結果
| 問題 |
No.5 数字のブロック
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-02-28 16:30:05 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 25,472 KB |
| 実行使用メモリ | 8,236 KB |
| 最終ジャッジ日時 | 2025-02-28 16:30:08 |
| 合計ジャッジ時間 | 1,562 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 34 |
コンパイルメッセージ
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", &bigbox);
| ^~~~~~~~~~~~~~~~~~~~
main.c:10:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d", &len);
| ^~~~~~~~~~~~~~~~~
main.c:15:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | scanf("%d",&val[i]);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <stdlib.h>
int main(void){
// 大きい箱
int bigbox = 0;
scanf("%d", &bigbox);
printf("箱:%d\n", bigbox);
int len = 0;
scanf("%d", &len);
printf("個数:%d\n", len);
int val[len];
for(int i = 0;i < len;i++){
scanf("%d",&val[i]);
printf("配列:%d\n",val[i]);
}
}
sasa