結果

問題 No.276 連続する整数の和(1)
ユーザー togatogatogatoga
提出日時 2015-09-05 11:28:59
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 573 bytes
コンパイル時間 532 ms
使用メモリ 9,752 KB
最終ジャッジ日時 2023-02-17 06:02:10
合計ジャッジ時間 1,179 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 12 ms
9,700 KB
testcase_01 AC 10 ms
7,680 KB
testcase_02 AC 11 ms
7,592 KB
testcase_03 AC 10 ms
9,692 KB
testcase_04 AC 10 ms
9,700 KB
testcase_05 AC 11 ms
7,592 KB
testcase_06 AC 10 ms
9,692 KB
testcase_07 AC 11 ms
7,652 KB
testcase_08 AC 11 ms
7,596 KB
testcase_09 AC 11 ms
9,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N = input()
if (N % 2 == 0):
    print N / 2
else:
    print N
sys.exit()    
for i in range(1, 100):
    a = 1
    t1 = 0
    deg = [0] * 10000
    for x in range(i):
        t1 += a
        a += 1
    for x in range(1, t1 / 2 + 1):
        if (t1 % x == 0):
            deg[x] += 1
    a = 2
    t2 = 0
    for x in range(i):
        t2 += a
        a += 1
    for x in range(1, t2 / 2 + 1):
        if (t2 % x == 0):
            deg[x] += 1
    res = 0
    for index,x in enumerate(deg):
        if (x >= 2):
            res = max(res, index)
    print i,res
0