結果
問題 | No.523 LED |
ユーザー |
![]() |
提出日時 | 2017-06-09 14:50:28 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 446 bytes |
コンパイル時間 | 397 ms |
コンパイル使用メモリ | 55,600 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-22 14:17:45 |
合計ジャッジ時間 | 1,246 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 24 |
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 8 | main() | ^~~~
ソースコード
#include <iostream> unsigned long int ans; unsigned long int kaijo(unsigned long int); using namespace std; main() { int N; unsigned long int tou; cin >> N; tou=0; for(int i=1;i<=N;i++){ // tou=tou*kaijo(2*(i-1)+1); tou=tou+i*(2*i-1); } cout << tou<< endl; return 0; } /*unsigned long int kaijo(unsigned long int a1) { if(a1==1) return 1; else{ ans=kaijo(a1-1); return ans + a1; } }*/