Submission #1307126


Source Code Expand

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp42
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] pos =Console.ReadLine().Split(' ');
            int W = int.Parse(pos[0]);
            int a = int.Parse(pos[1]);
            int b = int.Parse(pos[2]);

            if ((a+W)< b)
            {
                int answer1 = b - (a + W);
                Console.WriteLine(answer1);
            }else if ((b+W)< a)
            {
                int answer2 = a - (b + W);
                Console.WriteLine(answer2);
            }else if (a<=b && b<=(a+W) ||a<=(b+W) && b+W<=(a+W))
            {
                Console.WriteLine(0);
            }
        }
    }
}

Submission Info

Submission Time
Task A - HonestOrDishonest
User Brobromimi
Language C# (Mono 4.6.2.0)
Score 0
Code Size 834 Byte
Status RE
Exec Time 19 ms
Memory 10592 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
RE × 3
RE × 4
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt
Case Name Status Exec Time Memory
0_000.txt RE 19 ms 10592 KB
0_001.txt RE 19 ms 10592 KB
0_002.txt RE 19 ms 8544 KB
1_003.txt RE 19 ms 10592 KB