結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2014-11-27 23:32:13 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 1,544 ms |
コンパイル使用メモリ | 155,080 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-03 09:28:18 |
合計ジャッジ時間 | 2,463 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 WA * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:13:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d",&n); | ~~~~~^~~~~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; typedef __float128 flt; int main(void) { int n; flt res; long double a; res = 0; scanf("%d",&n); for( int i = 0; i < n; i++ ) { cin >> a; res += a; } printf("%.10Lf\n",(long double)res); return 0; }