Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.FileReader;
- import java.io.FileWriter;
- import java.io.PrintWriter;
- import java.util.Scanner;
- public class Privet {
- public static void main(String args[]) throws Exception {
- Scanner in = new Scanner(new FileReader("hello.in"));
- PrintWriter out = new PrintWriter(new FileWriter("hello.out"), true);
- long x = in.nextLong(), y = in.nextLong();
- long a = (x * (x - 1) / 2), b = y * (2 * x + y - 1);
- out.println(a + " " + b);
- }
- }
Add Comment
Please, Sign In to add comment