結果
問題 | No.864 四方演算 |
ユーザー |
![]() |
提出日時 | 2019-08-16 21:39:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 201 ms / 1,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-09-25 10:44:08 |
合計ジャッジ時間 | 4,711 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
from math import sqrtdef inpl(): return list(map(int, input().split()))N = int(input())K = int(input())ans = 0def calc(z):if z <= N+1:return z-1elif z > 2*N:return 0else:return 2*N - z + 1for x in range(1, int(sqrt(K))+1):if K%x:continuey = K//xans += (1+(x!=y))*calc(x)*calc(y)print(ans)