結果

問題 No.864 四方演算
ユーザー syunsukesyunsuke
提出日時 2019-08-29 22:58:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-28 21:35:36
合計ジャッジ時間 6,654 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 87 ms
10,752 KB
testcase_03 AC 253 ms
10,624 KB
testcase_04 AC 274 ms
10,624 KB
testcase_05 AC 204 ms
10,624 KB
testcase_06 AC 277 ms
10,752 KB
testcase_07 AC 257 ms
10,624 KB
testcase_08 AC 226 ms
10,752 KB
testcase_09 AC 141 ms
10,752 KB
testcase_10 AC 131 ms
10,752 KB
testcase_11 AC 78 ms
10,752 KB
testcase_12 AC 243 ms
10,624 KB
testcase_13 AC 169 ms
10,624 KB
testcase_14 AC 87 ms
10,624 KB
testcase_15 AC 328 ms
10,752 KB
testcase_16 AC 241 ms
10,752 KB
testcase_17 AC 266 ms
10,752 KB
testcase_18 AC 244 ms
10,624 KB
testcase_19 AC 201 ms
10,752 KB
testcase_20 AC 294 ms
10,752 KB
testcase_21 AC 238 ms
10,752 KB
testcase_22 AC 214 ms
10,752 KB
testcase_23 AC 54 ms
10,752 KB
testcase_24 AC 200 ms
10,624 KB
testcase_25 AC 117 ms
10,624 KB
testcase_26 AC 225 ms
10,624 KB
testcase_27 AC 31 ms
10,752 KB
testcase_28 AC 30 ms
10,752 KB
testcase_29 AC 30 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
K=int(input())
ans=0
for i in range(2,2*N+1):
    if i*i>K:
        break
    elif K%i==0 and K//i<=2*N:
        if i>N:
            cnt1=2*N-i+1
        else:
            cnt1=i-1
        if K//i>N:
            cnt2=2*N-(K//i)+1
        else:
            cnt2=(K//i)-1
        ans+=cnt1*cnt2
        #print(ans*2)
print(ans*2)
0