結果
問題 | No.864 四方演算 |
ユーザー |
![]() |
提出日時 | 2022-05-22 11:17:02 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 57 ms / 1,000 ms |
コード長 | 429 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 59,008 KB |
最終ジャッジ日時 | 2024-09-20 12:27:59 |
合計ジャッジ時間 | 2,719 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
N = int(input()) K = int(input()) if K < 4: print(0) exit() res = 0 for i in range(2,K+1): if i*i>K: break if K%i == 0 and i<=2*N and K//i<=2*N: s = 1 if i != K//i: s *= 2 if i > N: s *= abs((i-N)-N)+1 else: s *= i-1 if K//i>N: s *= abs((K//i-N)-N)+1 else: s *= K//i-1 res += s print(res)