結果
問題 | No.369 足し間違い |
ユーザー |
![]() |
提出日時 | 2016-10-24 22:34:13 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 228 bytes |
コンパイル時間 | 778 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 03:25:08 |
合計ジャッジ時間 | 608 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 5 |
コンパイルメッセージ
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); | ^~~~~~~~~~~~~~
ソースコード
#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; }