Cod sursa(job #2492543)

Utilizator Botzki17Botocan Cristian-Alexandru Botzki17 Data 14 noiembrie 2019 21:39:53
Problema A+B Scor 0
Compilator java Status done
Runda teme_upb Marime 1.81 kb
import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            File file = new File("adunare.in");
            br = new BufferedReader( new InputStreamReader(System.in));//bagam citire de la tastatura :)

        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try{
                    st = new StringTokenizer(br.readLine());
                }
                catch (Exception e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        String nextLine()
        {
            String string = new String();
            try{
                string = br.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return string;
        }
    }//FastReader Class


    public static void main(String[] args)
    {
       FastReader fr = new FastReader();
      int  a = fr.nextInt();
      int b = fr.nextInt();
      int s = a+ b;
      FileWriter out = null;
        try {
            out = new FileWriter("adunare.out");
            out.write(s);
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}