#C6476. Snack Packs for Friends

    ID: 50240 Type: Default 1000ms 256MiB

Snack Packs for Friends

Snack Packs for Friends

You are given an integer \(n\) representing the number of friends attending an event. Based on the number of friends, you need to determine the number of snack packs to buy. The rules are as follows:

  • If \(n < 10\), buy 2 packs of snacks.
  • If \(10 \le n < 20\), buy 4 packs of snacks.
  • If \(20 \le n < 50\), buy 10 packs of snacks.
  • If \(n \ge 50\), buy 20 packs of snacks.

Your task is to implement a solution that reads the input from standard input (stdin) and prints the correct recommendation to standard output (stdout).

inputFormat

The input consists of a single line containing an integer \(n\) which represents the number of friends.

outputFormat

Output a single line with the string indicating the number of snack packs to buy. The expected strings are:

  • "Buy 2 packs of snacks"
  • "Buy 4 packs of snacks"
  • "Buy 10 packs of snacks"
  • "Buy 20 packs of snacks"
## sample
1
Buy 2 packs of snacks