結果
| 問題 |
No.369 足し間違い
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2016-05-16 11:45:17 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 213 bytes |
| コンパイル時間 | 207 ms |
| コンパイル使用メモリ | 20,096 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-06 04:21:14 |
| 合計ジャッジ時間 | 706 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%lld", &n);
| ^~~~~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%lld", &a);
| ^~~~~~~~~~~~~~~~~
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%lld", &v);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
long long int i, n, a, sum = 0, v;
scanf("%lld", &n);
for(i = 0;i < n;i++){
scanf("%lld", &a);
sum += a;
}
scanf("%lld", &v);
printf("%lld", sum - v);
return 0;
}
suppy193