結果

問題 No.111 あばばばば
ユーザー konabe
提出日時 2018-07-07 17:33:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 162 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-05 00:03:22
合計ジャッジ時間 981 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

L = int(input())
#r = sum(L - i + 1 for i in range(1, L+1) if i % 2 == 1 and i > 1)
if L % 2 == 0:
    n = L//2 - 1
else:
    n = L//2
r = n*L - n*(n+1)
print(r)
0