結果

問題 No.864 四方演算
ユーザー kumatan400kumatan400
提出日時 2021-09-05 06:34:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 226 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 76,284 KB
最終ジャッジ日時 2023-08-23 14:01:31
合計ジャッジ時間 5,176 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 83 ms
76,112 KB
testcase_03 AC 84 ms
76,104 KB
testcase_04 AC 86 ms
76,120 KB
testcase_05 AC 82 ms
76,104 KB
testcase_06 AC 85 ms
76,124 KB
testcase_07 AC 83 ms
75,916 KB
testcase_08 AC 81 ms
75,980 KB
testcase_09 AC 78 ms
76,060 KB
testcase_10 AC 78 ms
76,284 KB
testcase_11 AC 76 ms
76,000 KB
testcase_12 AC 82 ms
76,076 KB
testcase_13 AC 79 ms
76,128 KB
testcase_14 AC 77 ms
76,000 KB
testcase_15 AC 86 ms
75,924 KB
testcase_16 AC 84 ms
76,064 KB
testcase_17 AC 84 ms
76,000 KB
testcase_18 AC 86 ms
76,068 KB
testcase_19 AC 83 ms
75,988 KB
testcase_20 AC 88 ms
76,056 KB
testcase_21 AC 86 ms
75,988 KB
testcase_22 AC 85 ms
76,104 KB
testcase_23 AC 77 ms
75,844 KB
testcase_24 AC 82 ms
75,872 KB
testcase_25 AC 94 ms
76,040 KB
testcase_26 AC 83 ms
76,008 KB
testcase_27 AC 71 ms
71,676 KB
testcase_28 AC 72 ms
71,536 KB
testcase_29 AC 72 ms
71,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = 0
for a in range(1, int(K**0.5)+1):
    if K % a != 0:
        continue
    b = K // a

    a = min(a-1, max(0, 2*N-a+1))
    b = min(b-1, max(0, 2*N-b+1))

    ans += a*b*2

print(ans)
0