結果

問題 No.864 四方演算
ユーザー aaaaaaaaaa2230
提出日時 2022-05-21 11:33:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 58,624 KB
最終ジャッジ日時 2024-09-20 11:24:22
合計ジャッジ時間 2,699 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
k = int(input())

def count(x):

    if x > 2*n:
        return 0

    if x <= n+1:
        return x-1
    
    dif = x-(n+1)
    return n - dif

ans = 0
for i in range(2,int(k**0.5)+1):

    if k%i:
        continue

    x = i
    y = k//i
    if y == 1:
        continue

    ans += 2*count(x)*count(y)
print(ans)
0