結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,056 KB
testcase_01 AC 11 ms
6,028 KB
testcase_02 AC 11 ms
5,996 KB
testcase_03 AC 11 ms
6,152 KB
testcase_04 AC 10 ms
6,040 KB
testcase_05 AC 11 ms
6,148 KB
testcase_06 AC 11 ms
6,092 KB
testcase_07 AC 11 ms
5,940 KB
testcase_08 AC 12 ms
6,024 KB
testcase_09 AC 11 ms
6,048 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