結果
問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
ユーザー |
|
提出日時 | 2025-09-15 17:39:54 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 277 bytes |
コンパイル時間 | 428 ms |
コンパイル使用メモリ | 26,056 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-15 17:39:56 |
合計ジャッジ時間 | 1,955 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 9 WA * 6 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d", &N); | ^~~~~~~~~~~~~~~ main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d", &x); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdint.h> int main(void) { int N; scanf("%d", &N); long long sum = 0; // 64ビット整数 for (int i = 0; i < N; i++) { int x; scanf("%d", &x); sum += x; } printf("%lld\n", sum); return 0; }