結果
| 問題 |
No.276 連続する整数の和(1)
|
| コンテスト | |
| ユーザー |
ty70
|
| 提出日時 | 2015-12-14 16:29:03 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 341 bytes |
| コンパイル時間 | 584 ms |
| コンパイル使用メモリ | 53,708 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-15 12:33:49 |
| 合計ジャッジ時間 | 1,167 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <iostream>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
using namespace std;
typedef long long ll;
int main()
{
ios_base::sync_with_stdio(0);
ll n; cin >> n;
ll res = 0LL;
if (n % 2LL == 0LL){
res = n / 2LL;
}else{ // n % 2LL == 1LL
res = n;
} // end if
cout << res << endl;
return 0;
}
ty70