package laba3;

import java.util.Scanner;

public class example11 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // ===== Timus 1068 — Sum =====
        System.out.println("Задача Timus 1068 (Sum)");
        System.out.print("Введите целое число n: ");
        int n = scanner.nextInt();

        int sum = 0;
        if (n >= 1) {
            for (int i = 1; i <= n; i++) {
                sum += i;
            }
        } else {
            for (int i = n; i <= 1; i++) {
                sum += i;
            }
        }

        System.out.println("Сумма чисел: " + sum);

        // ===== Timus 1785 — Lost in Localization =====
        System.out.println("\nЗадача Timus 1785 (Lost in Localization)");
        System.out.print("Введите количество монстров: ");
        int monsters = scanner.nextInt();

        if (monsters >= 1 && monsters <= 4) {
            System.out.println("few");
        } else if (monsters <= 9) {
            System.out.println("several");
        } else if (monsters <= 19) {
            System.out.println("pack");
        } else if (monsters <= 49) {
            System.out.println("lots");
        } else if (monsters <= 99) {
            System.out.println("horde");
        } else if (monsters <= 249) {
            System.out.println("throng");
        } else if (monsters <= 499) {
            System.out.println("swarm");
        } else if (monsters <= 999) {
            System.out.println("zounds");
        } else {
            System.out.println("legion");
        }

        scanner.close();
    }
}