結果
問題 | No.276 連続する整数の和(1) |
ユーザー | けむけむ |
提出日時 | 2021-07-23 00:37:45 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 373 bytes |
コンパイル時間 | 714 ms |
コンパイル使用メモリ | 10,712 KB |
実行使用メモリ | 15,920 KB |
最終ジャッジ日時 | 2023-09-24 21:30:53 |
合計ジャッジ時間 | 2,868 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
15,920 KB |
testcase_01 | AC | 17 ms
7,792 KB |
testcase_02 | AC | 16 ms
7,824 KB |
testcase_03 | TLE | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
ソースコード
def seisuwa(N): M = 0 for n in range(1, N): M += n Nl = [] for i in range(1, N + 1): if N % i == 0: Nl.append(i) for j in range(1, len(Nl) + 1): if M % Nl[-j] == 0: ans = Nl[-j] break return ans def main(): N = int(input()) print(seisuwa(N)) if __name__ == '__main__': main()