結果

問題 No.1822 Keima of Shogi
ユーザー lucky3977
提出日時 2022-02-04 20:46:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 2,360 ms
コンパイル使用メモリ 191,020 KB
最終ジャッジ日時 2025-01-27 18:35:48
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

using ll = long long;
const int INF = 1<<30;
const long long LINF = 1LL<<60;
const long long MOD = (long long)1e9 + 7;

int main(){
    ll n, ans = 0;
    cin >> n;
    ll m = (n + 1) / 2;
    ans = (1 + m) * m / 2;
    cout << ans << endl;
    return 0;
}
0