Input CR, if it's a hoard or not, then roll loot.
Based on the tables and rules in the Dungeon Master's Guide, pages 133-149.