結果

問題 No.276 連続する整数の和(1)
ユーザー airisairis
提出日時 2015-09-04 22:43:30
言語 Python2
(2.7.18)
結果
AC  
実行時間 24 ms / 1,000 ms
コード長 102 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 7,796 KB
最終ジャッジ日時 2023-09-26 06:03:10
合計ジャッジ時間 1,928 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 24 ms
7,796 KB
testcase_01 AC 24 ms
7,736 KB
testcase_02 AC 23 ms
7,608 KB
testcase_03 AC 23 ms
7,792 KB
testcase_04 AC 23 ms
7,732 KB
testcase_05 AC 24 ms
7,628 KB
testcase_06 AC 22 ms
7,784 KB
testcase_07 AC 23 ms
7,620 KB
testcase_08 AC 24 ms
7,624 KB
testcase_09 AC 23 ms
7,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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