結果
問題 |
No.276 連続する整数の和(1)
|
ユーザー |
![]() |
提出日時 | 2015-09-04 23:17:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 182 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 33,100 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 02:01:16 |
合計ジャッジ時間 | 657 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:20: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | int n;scanf("%d",&n); | ~~~~~^~~~~~~~~
ソースコード
#include <stdio.h> #include <algorithm> using namespace std; //namaega184 int main(){ int n;scanf("%d",&n); long long ans=(long long)n*(n+1)/2; printf("%lld\n",ans); return 0; }