結果

問題 No.1616 Joke
ユーザー kimiyukikimiyuki
提出日時 2021-07-22 21:47:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 252 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 794 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 89,060 KB
最終ジャッジ日時 2023-09-24 16:25:14
合計ジャッジ時間 6,247 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 250 ms
88,880 KB
testcase_01 AC 250 ms
88,740 KB
testcase_02 AC 243 ms
88,884 KB
testcase_03 AC 248 ms
88,920 KB
testcase_04 AC 246 ms
89,012 KB
testcase_05 AC 246 ms
89,000 KB
testcase_06 AC 238 ms
88,864 KB
testcase_07 AC 228 ms
88,944 KB
testcase_08 AC 240 ms
88,888 KB
testcase_09 AC 251 ms
88,824 KB
testcase_10 AC 251 ms
89,060 KB
testcase_11 AC 245 ms
88,916 KB
testcase_12 AC 247 ms
88,620 KB
testcase_13 AC 250 ms
88,944 KB
testcase_14 AC 252 ms
88,904 KB
testcase_15 AC 241 ms
88,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import fractions


def solve(n: int) -> int:
    a = 0
    b = 0
    for d in range(1, n + 1):
        if n % d == 0:
            a += d
            b += fractions.Fraction(1, d)
    return a // b


# generated by oj-template v4.8.0 (https://github.com/online-judge-tools/template-generator)
def main():
    N = int(input())
    a = solve(N)
    print(a)


if __name__ == '__main__':
    main()
0