Source Code
import java.io.*;
import java.util.*;

public class Cses {
    static boolean[] table = new boolean[10001];
    static StringBuilder sb = new StringBuilder();
    static TreeSet<String> sn = new TreeSet<>();
    static List<Long> sm = new ArrayList<>();
    static boolean[][] visited = new boolean[7][7];

    static int numberOfWays = 0;

    static class Point {
        int a;
        int b;

        public Point(int a, int b) {
            this.a = a;
            this.b = b;

        }
    }
static int ways;

    static  void dfs(int n ,int m, int i , int j,boolean[][] visited ,int steps ){

        System.out.println(i+"  "+j);
        boolean r,l,u,d = false;


        visited[i][j]=true;
        steps++;
if( i<n-1)if (!visited[i+1][j] ){dfs(n,m,i+1,j,visited,steps);}
if( j<m-1)if (!visited[i][j+1])dfs(n,m,i,j+1,visited,steps);
        if( i>0)if (!visited[i-1][j])dfs(n,m,i-1,j,visited,steps);
        if( j>0)if (!visited[i][j-1])dfs(n,m,i,j-1,visited,steps);

            if (steps== 3*3)ways++;



    }
    static void sieveOfEratosthenes() {
        // Create a boolean array "prime[0..n]" and initialize
        // all entries it as true. A value in prime[i] will
        // finally be false if i is Not a prime, else true.

        for (int i = 0; i <= 10000; i++) {
            table[i] = true;
        }

        for (int p = 2; p * p <= 100000000; p++) {
            // If prime[p] is not changed, then it is a prime
            if (table[p]) {
                // Update all multiples of p
                for (int i = p * p; i <= 100000000; i += p)
                    table[i] = false;
            }
        }

        // Print all prime numbers

    }

    public static void minDistance(int[] tab, long s, int index) {
        if (tab.length == index) {
            sm.add(s);
            return;
        }
        int go = tab[index];
        index++;
        minDistance(tab, s, index);
        minDistance(tab, s + go, index);

    }

    public static void steps(int n, int start, int end) {

        int mid = 0;
        if (n == 0) return;
        if (start + end == 3) mid = 3;
        if (start + end == 4) mid = 2;
        if (start + end == 5) mid = 1;
        steps(n - 1, start, mid);
        sb.append(start).append(" ").append(end).append(System.lineSeparator());
        steps(n - 1, mid, end);


    }

    public static void print_rec(LinkedList<String> strings, StringBuilder s) {
        if (strings.size() == 0) {
            sn.add(String.valueOf(s));
            return;
        }
        for (int i = 0; i < strings.size(); i++) {
            StringBuilder ss = new StringBuilder();
            LinkedList<String> subStrings = (LinkedList<String>) strings.clone();
            subStrings.remove(i);

            ss.append(s).append(strings.get(i));
            print_rec(subStrings, ss);


        }

    }

    static boolean[] ld = new boolean[15];
    static boolean[] rd = new boolean[15];
    static boolean[] col = new boolean[8];
    static boolean[][] reserved = new boolean[8][8];

    static void callNumberOfWays(int j) {
        if (j == 8) {
            numberOfWays++;
            return;
        }
        for (int i = 0; i < 8; i++) {
            if (!ld[i + j] && !rd[i - j + 7] && !col[i] && !reserved[j][i]) {

                ld[i + j] = rd[i - j + 7] = col[i] = true;

                callNumberOfWays(j + 1);
                ld[i + j] = rd[i - j + 7] = col[i] = false;
            }

        }


    }

    static int comp(String s1, String s2) {
        char[] tab1 = s1.toCharArray();
        char[] tab2 = s2.toCharArray();
        int res = 0;
        for (int i = 0; i < s1.length(); i++) {
            res += Math.abs(tab1[i] - tab2[i]);
        }
        return res;
    }

    static int binarySearch(ArrayList<Long> arr, int l, int r, long x) {


        if (r >= l) {
            int mid = l + (r - l) / 2;

            // If the element is present at the
            // middle itself
            if (arr.get(mid) == x)
                return mid;

            // If element is smaller than mid, then
            // it can only be present in left subarray
            if (arr.get(mid) > x)
                return binarySearch(arr, l, mid - 1, x);

            // Else the element can only be present
            // in right subarray
            return binarySearch(arr, mid + 1, r, x);
        }else return l;

        // We reach here when element is not present
        // in array

    }

    public static void main(String[] args) throws Exception {
        Reader s = new Reader();
        //BufferedReader b = new BufferedReader(new InputStreamReader(System.in));


        long n =s.nextLong();
        long x = s.nextLong();
        long y =s.nextLong();
        Long res = n*x;
        res=(long)(res*y);
        res /= x+y;
        System.out.println( ((long) n *x*y)/(x+y));
            s.close();
        }



    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(
                    new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    if (cnt != 0) {
                        break;
                    }
                    else {
                        continue;
                    }
                }
                buf[cnt++] = (byte)c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0,
                    BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
/*
    public static void main(String[] args)
            throws IOException
    {
        Reader s = new Reader();
        int n = s.nextInt();
        int k = s.nextInt();
        int count = 0;
        while (n-- > 0) {
            int x = s.nextInt();
            if (x % k == 0)
                count++;
        }
        System.out.println(count);
    }*/
}

Copy
Hurry up the-underdog
Java 11
70 ms
12.3 MB
Wrong Answer