結果
| 問題 |
No.278 連続する整数の和(2)
|
| コンテスト | |
| ユーザー |
kongarishisyamo
|
| 提出日時 | 2016-05-19 10:30:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 210 bytes |
| コンパイル時間 | 452 ms |
| コンパイル使用メモリ | 53,756 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-06 06:01:44 |
| 合計ジャッジ時間 | 1,252 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 15 |
ソースコード
#include<iostream>
using namespace std;
int main(){
long long N;
long long x,n=0;
long long ans=0;
cin>>N;
if(N==2) cout<<"1"<<endl;
else if(N%2==1) cout<<N+1<<endl;
else cout<<N/2+1<<endl;
}
kongarishisyamo