結果

問題 No.864 四方演算
ユーザー c-yanc-yan
提出日時 2020-11-09 00:10:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 7,968 KB
最終ジャッジ日時 2023-09-29 21:47:44
合計ジャッジ時間 4,321 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 107 ms
7,784 KB
testcase_03 AC 104 ms
7,784 KB
testcase_04 AC 117 ms
7,832 KB
testcase_05 AC 91 ms
7,936 KB
testcase_06 AC 118 ms
7,720 KB
testcase_07 AC 108 ms
7,920 KB
testcase_08 AC 98 ms
7,792 KB
testcase_09 AC 60 ms
7,780 KB
testcase_10 AC 55 ms
7,804 KB
testcase_11 AC 32 ms
7,928 KB
testcase_12 AC 97 ms
7,880 KB
testcase_13 AC 74 ms
7,744 KB
testcase_14 AC 40 ms
7,792 KB
testcase_15 AC 138 ms
7,828 KB
testcase_16 AC 102 ms
7,968 KB
testcase_17 AC 116 ms
7,828 KB
testcase_18 AC 106 ms
7,796 KB
testcase_19 AC 82 ms
7,872 KB
testcase_20 AC 119 ms
7,924 KB
testcase_21 AC 100 ms
7,792 KB
testcase_22 AC 97 ms
7,832 KB
testcase_23 AC 23 ms
7,792 KB
testcase_24 AC 83 ms
7,824 KB
testcase_25 AC 48 ms
7,924 KB
testcase_26 AC 93 ms
7,936 KB
testcase_27 AC 13 ms
7,820 KB
testcase_28 AC 12 ms
7,872 KB
testcase_29 AC 12 ms
7,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
K = int(input())


def f(x):
    if x > 2 * N:
        return 0
    if x - 1 < N:
        return x - 1
    return (x - 1) - ((x - 1) - N) * 2


result = 0
for i in range(2, int(K ** 0.5) + 1):
    if K % i != 0:
        continue
    result += f(i) * f(K // i) * 2
print(result)
0