結果
| 問題 | No.864 四方演算 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-05 06:41:33 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 38 ms / 1,000 ms |
| + 552µs | |
| コード長 | 280 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 64,640 KB |
| 実行使用メモリ | 58,112 KB |
| 最終ジャッジ日時 | 2026-10-20 01:59:25 |
| 合計ジャッジ時間 | 3,896 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
N = int(input())
K = int(input())
ans = 0
for a in range(1, int(K**0.5)+1):
if K % a != 0:
continue
b = K // a
na = min(a-1, max(0, 2*N-a+1))
nb = min(b-1, max(0, 2*N-b+1))
if a == b:
ans += na*nb
else:
ans += na*nb*2
print(ans)