ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2100. Wedding Dinner

Не понимаю в чем проблема. Пишет Runtime Error
Posted by Roman 14 Apr 2023 21:34
import java.util.Scanner;

public class Task_2100 {
    public static void main(String[] args){
        Scanner scr1 = new Scanner(System.in);
        Scanner scr2 = new Scanner(System.in);

        int n, counter;
        n = scr1.nextInt();
        counter = n+2;
        while(n-- > 0){
            String guest = scr2.nextLine();
            String substring = "+";
            if(guest.contains(substring)){
                counter++;
            }
        }
        if(counter==13) {
            counter++;
        }
        System.out.print(counter*100);
    }
}