ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1068. Сумма

I do need some help in the 1068 problem, When using IDE is OK, but submit crash many times.
Послано Hufeng Zhou 11 май 2010 08:36
Hello, I tried many times, but do not know where is the problem, I wrote java and run on IDE it seems OK, but every time when I submitted it can not be accepted. Would you please give me some help. Thank you so much!

import java.util.*;
public class SumAllInt1068 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int f = sc.nextInt();
        int e = a+b+c+d+f;
        System.out.println(e);

    }

}
Re: I do need some help in the 1068 problem, When using IDE is OK, but submit crash many times.
Послано Sandro (USU) 11 май 2010 10:58
The input consists of a SINGLE integer. You have got Crash because try to read 5 integers. Look Sample test.
Re: I do need some help in the 1068 problem, When using IDE is OK, but submit crash many times.
Послано Hufeng Zhou 11 май 2010 15:38
I understand, thank you so much for your help.