結果

問題 No.864 四方演算
ユーザー nep_pudding3nep_pudding3
提出日時 2019-08-16 21:56:53
言語 PyPy3
(7.3.8)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 284 bytes
コンパイル時間 249 ms
使用メモリ 81,168 KB
最終ジャッジ日時 2022-11-23 13:23:25
合計ジャッジ時間 4,185 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 88 ms
80,984 KB
testcase_03 AC 84 ms
80,788 KB
testcase_04 AC 85 ms
80,852 KB
testcase_05 AC 85 ms
80,932 KB
testcase_06 AC 86 ms
80,716 KB
testcase_07 AC 86 ms
80,728 KB
testcase_08 AC 85 ms
80,880 KB
testcase_09 AC 81 ms
80,604 KB
testcase_10 AC 80 ms
80,604 KB
testcase_11 AC 77 ms
80,688 KB
testcase_12 AC 87 ms
80,680 KB
testcase_13 AC 83 ms
80,652 KB
testcase_14 AC 80 ms
80,656 KB
testcase_15 AC 93 ms
80,824 KB
testcase_16 AC 86 ms
80,696 KB
testcase_17 AC 91 ms
80,640 KB
testcase_18 AC 88 ms
81,000 KB
testcase_19 AC 84 ms
80,664 KB
testcase_20 AC 88 ms
80,648 KB
testcase_21 AC 86 ms
80,644 KB
testcase_22 AC 85 ms
81,168 KB
testcase_23 AC 77 ms
80,828 KB
testcase_24 AC 81 ms
80,652 KB
testcase_25 AC 80 ms
80,652 KB
testcase_26 AC 84 ms
80,572 KB
testcase_27 AC 74 ms
76,176 KB
testcase_28 AC 75 ms
76,080 KB
testcase_29 AC 74 ms
75,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
K = int(input())
ans = 0
for i in range(2,int(K**0.5)+1):
    if K%i == 0:
        ac = min(i-1,max(0,N*2-i+1))
        j = K//i
        bd = min(j-1,max(0,N*2-j+1))
        ans += ac*bd*2

if K**0.5 % 1 == 0:
    ans -= min(K**0.5-1,max(0,N*2-(K**0.5)+1))
print(ans)
0