結果
| 問題 |
No.864 四方演算
|
| ユーザー |
syunsuke
|
| 提出日時 | 2019-08-29 22:58:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 342 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-17 17:53:18 |
| 合計ジャッジ時間 | 6,716 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 WA * 2 |
ソースコード
N=int(input())
K=int(input())
ans=0
for i in range(2,2*N+1):
if i*i>K:
break
elif K%i==0 and K//i<=2*N:
if i>N:
cnt1=2*N-i+1
else:
cnt1=i-1
if K//i>N:
cnt2=2*N-(K//i)+1
else:
cnt2=(K//i)-1
ans+=cnt1*cnt2
#print(ans*2)
print(ans*2)
syunsuke