結果

問題 No.276 連続する整数の和(1)
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-08-10 23:15:46
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 181 bytes
コンパイル時間 1,994 ms
使用メモリ 9,772 KB
最終ジャッジ日時 2023-02-18 03:22:49
合計ジャッジ時間 3,477 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
7,564 KB
testcase_01 AC 0 ms
9,712 KB
testcase_02 AC 1 ms
7,608 KB
testcase_03 AC 0 ms
7,608 KB
testcase_04 AC 0 ms
7,596 KB
testcase_05 AC 0 ms
7,596 KB
testcase_06 AC 1 ms
9,772 KB
testcase_07 AC 1 ms
7,672 KB
testcase_08 AC 1 ms
9,772 KB
testcase_09 AC 1 ms
9,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n;
    cin>>n;
    if (n%2==0) cout<<n/2;
    else cout<<n;
    cout<<endl;
    return 0;
}
0