Skip to content

Instantly share code, notes, and snippets.

@monhime
Last active August 15, 2021 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monhime/98920b58f32a8ee5f46bc86e233978c1 to your computer and use it in GitHub Desktop.
Save monhime/98920b58f32a8ee5f46bc86e233978c1 to your computer and use it in GitHub Desktop.
ABC214_B
import sys
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
import math # math.inf
def input(): return sys.stdin.readline().rstrip()
def main():
mod = 10**9 + 7
s, t = map(int,input().split())
ans = 0
for a in range(s + 1):
for b in range(s + 1):
if a + b > s:
break
for c in range(s + 1):
if a + b + c > s:
break
if a*b*c <= t:
ans += 1
print(ans)
if __name__=='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment