結果

問題 No.369 足し間違い
ユーザー HaijinnHaijinn
提出日時 2016-10-24 22:34:13
言語 C90
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 228 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-03 05:53:50
合計ジャッジ時間 883 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 | scanf("%d",&n);
      | ^~~~~~~~~~~~~~
main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |         scanf("%d",&a[i]);
      |         ^~~~~~~~~~~~~~~~~
main.c:16:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 | scanf("%d",&u);
      | ^~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
int n;
int a[100000];
int u;
scanf("%d",&n);
int i;
int k;
int y;
for(i=0;i<n;i++){
	
	scanf("%d",&a[i]);
}
scanf("%d",&u);
for(k=0;k<n;k++){
	
	y+=a[k];
}
y=y-u;
printf("%d",y);
	return 0;
}
0