結果
問題 | No.864 四方演算 |
ユーザー |
![]() |
提出日時 | 2020-11-09 00:14:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 187 ms / 1,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 100 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-22 15:48:14 |
合計ジャッジ時間 | 4,469 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
N = int(input()) K = int(input()) def f(x): if x > 2 * N: return 0 if x - 1 < N: return x - 1 return (x - 1) - ((x - 1) - N) * 2 result = 0 for i in range(2, int(K ** 0.5) + 1): if K % i != 0: continue if i == K // i: result += f(i) * f(K // i) else: result += f(i) * f(K // i) * 2 print(result)