結果

問題 No.143 豆
ユーザー つなぎ
提出日時 2017-02-16 13:51:50
言語 C90
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 199 bytes
コンパイル時間 656 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-30 00:13:44
合計ジャッジ時間 1,353 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 | scanf("%d %d %d",&k,&n,&f);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:9:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |   scanf("%d",&aa[i]);
      |   ^~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include "stdio.h"

int main(void) {
int k,n,f,mame,i,bb=0;
scanf("%d %d %d",&k,&n,&f);
mame=k*n;
int aa[f];
for(i=0;i<f;i++){
  scanf("%d",&aa[i]);
  bb+=aa[i];
}
printf("%d",mame-bb);
  return 0;
}
0