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 1293. Eniya

Help error
Posted by Leonid322S 15 Nov 2016 17:38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication8
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = Convert.ToInt32(Console.ReadLine());
            int A = Convert.ToInt32(Console.ReadLine());
            int B = Convert.ToInt32(Console.ReadLine());
            if (N >= 1 && 100 >= N)
                if (A >= 1 && 100 >= A)
                    if (B >= 1 && 100 >= B)
                    {
                Console.WriteLine(N * A * B * 2);
            }
        }
    }
}
Re: Help error
Posted by ToadMonster 16 Nov 2016 16:49
1) Here is task fragment: "The only line contains integers...."
You are reading 3 lines.

2) if (N) if (A) if (B) {...} - else what?
Any difference how exactly your program fail in "else" case?
I think you should skip parameters check or fail in some specific way - visible and different from regular mistake.

Edited by author 16.11.2016 16:53