結果

問題 No.276 連続する整数の和(1)
ユーザー airisairis
提出日時 2015-09-04 22:43:30
言語 Python2
(2.7.18)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 102 bytes
コンパイル時間 36 ms
使用メモリ 9,772 KB
最終ジャッジ日時 2023-02-17 02:58:45
合計ジャッジ時間 1,622 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 22 ms
9,772 KB
testcase_01 AC 22 ms
9,740 KB
testcase_02 AC 22 ms
7,836 KB
testcase_03 AC 21 ms
7,768 KB
testcase_04 AC 22 ms
7,872 KB
testcase_05 AC 22 ms
7,824 KB
testcase_06 AC 22 ms
7,632 KB
testcase_07 AC 21 ms
9,700 KB
testcase_08 AC 22 ms
9,700 KB
testcase_09 AC 22 ms
7,828 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import fractions
n = input()
if n % 2 == 1:
  print n
else:
  print fractions.gcd(n, n * (n - 1) / 2)
0