atcoder#DIVERTA2019B. RGB Boxes
RGB Boxes
Score : points
Problem Statement
Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:
- Red boxes, each containing red balls
- Green boxes, each containing green balls
- Blue boxes, each containing blue balls
Snuke wants to get a total of exactly balls by buying red boxes, green boxes and blue boxes. How many triples of non-negative integers achieve this?
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
1 2 3 4
4
Four triples achieve the objective, as follows:
13 1 4 3000
87058