結果
| 問題 |
No.8100 始業式
|
| コンテスト | |
| ユーザー |
3mEhsfd8aG5jx2t
|
| 提出日時 | 2023-03-31 21:46:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 771 bytes |
| コンパイル時間 | 1,638 ms |
| コンパイル使用メモリ | 192,440 KB |
| 最終ジャッジ日時 | 2025-02-11 20:11:31 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:30:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
30 | scanf("%d", &T);
| ~~~~~^~~~~~~~~~
main.cpp:34:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
34 | scanf("%d", &N);
| ~~~~~^~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;
template< int sz >
struct FastInput {
char buf[sz + 1];
char* o;
FastInput() { init(); }
void init() {
o = buf;
buf[fread(buf, sizeof(char), sizeof(char) * sz, stdin)] = '\0';
}
int64_t read() {
int64_t ret = 0, sign = 1;
while(*o && *o <= 32) ++o;
if(*o == '-') sign *= -1, ++o;
while(*o >= '0' && *o <= '9') {
ret *= 10;
ret += *o++ - '0';
}
return ret * sign;
}
};
int main() {
int T;
scanf("%d", &T);
string c;
REP(_, T) {
int N;
scanf("%d", &N);
int ans = 0;
REP(i, N) {
int x;
cin >> x;
ans += x;
}
cout << ans;
}
cout << endl;
}
3mEhsfd8aG5jx2t