結果

問題 No.864 四方演算
ユーザー nep_pudding3nep_pudding3
提出日時 2019-08-16 21:56:53
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 284 bytes
コンパイル時間 3,651 ms
コンパイル使用メモリ 81,648 KB
実行使用メモリ 59,884 KB
最終ジャッジ日時 2023-10-24 23:00:26
合計ジャッジ時間 2,682 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 50 ms
59,816 KB
testcase_03 AC 50 ms
57,760 KB
testcase_04 AC 50 ms
57,760 KB
testcase_05 AC 48 ms
57,760 KB
testcase_06 AC 50 ms
57,760 KB
testcase_07 AC 49 ms
57,760 KB
testcase_08 AC 48 ms
57,760 KB
testcase_09 AC 44 ms
57,760 KB
testcase_10 AC 43 ms
57,760 KB
testcase_11 AC 40 ms
57,760 KB
testcase_12 AC 48 ms
57,760 KB
testcase_13 AC 46 ms
57,760 KB
testcase_14 AC 41 ms
57,760 KB
testcase_15 AC 51 ms
57,760 KB
testcase_16 AC 49 ms
57,760 KB
testcase_17 AC 51 ms
59,808 KB
testcase_18 AC 51 ms
59,884 KB
testcase_19 AC 47 ms
57,764 KB
testcase_20 AC 52 ms
59,812 KB
testcase_21 AC 49 ms
59,812 KB
testcase_22 AC 48 ms
59,820 KB
testcase_23 AC 39 ms
57,764 KB
testcase_24 AC 47 ms
57,764 KB
testcase_25 AC 44 ms
59,812 KB
testcase_26 AC 48 ms
59,812 KB
testcase_27 AC 35 ms
53,736 KB
testcase_28 AC 35 ms
53,736 KB
testcase_29 AC 36 ms
53,736 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