exec_outcome stringclasses 1
value | code_uid stringlengths 32 32 | file_name stringclasses 111
values | prob_desc_created_at stringlengths 10 10 | prob_desc_description stringlengths 63 3.8k | prob_desc_memory_limit stringclasses 18
values | source_code stringlengths 117 65.5k | lang_cluster stringclasses 1
value | prob_desc_sample_inputs stringlengths 2 802 | prob_desc_time_limit stringclasses 27
values | prob_desc_sample_outputs stringlengths 2 796 | prob_desc_notes stringlengths 4 3k ⌀ | lang stringclasses 5
values | prob_desc_input_from stringclasses 3
values | tags listlengths 0 11 | src_uid stringlengths 32 32 | prob_desc_input_spec stringlengths 28 2.37k ⌀ | difficulty int64 -1 3.5k ⌀ | prob_desc_output_spec stringlengths 17 1.47k ⌀ | prob_desc_output_to stringclasses 3
values | hidden_unit_tests stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PASSED | deb4ed1ed77be1b1c17bc8765614f93a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class ModerateModularMode {
private static final int START_TEST_CASE = 1;
public static void solveCase(FastIO io, int testCase) {
final long X = io.nextLong();
final long Y = io.nextLong();
if (X < Y) {
io.println(Y - (Y % X) / 2);
} else if (X... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 884bed54d8161a23a58f531e8a07ba73 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class ModerateModularMode {
private static final int START_TEST_CASE = 1;
public static void solveCase(FastIO io, int testCase) {
final long X = io.nextLong();
final long Y = io.nextLong();
if (X < Y) {
io.println(Y - ((Y % X) >> 1));
} else if... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 4644f66fad063ab2dcfb5bcf8e8f2697 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class ModerateModularMode {
private static final int START_TEST_CASE = 1;
public static void solveCase(FastIO io, int testCase) {
final long X = io.nextLong();
final long Y = io.nextLong();
if (X < Y) {
io.println(Y - ((Y % X) >> 1));
} else if... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 1119c57dac20ee0ddfc261f676ad1be8 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class ModerateModularMode {
private static final int START_TEST_CASE = 1;
public static void solveCase(FastIO io, int testCase) {
final long X = io.nextLong();
final long Y = io.nextLong();
if (X < Y) {
io.println(Y - (Y % X) / 2);
} else if (X... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 6ef706eb572655ca2a26ddb440c90415 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.util.concurrent.LinkedBlockingDeque;
import javax.print.attribute.IntegerSyntax;
import javax.sql.rowset.spi.SyncResolver;
import java.io.*;
import java.nio.channels.NonReadableChannelException;
import java.text.DateFormatSymbols;
import static java.lang.System.*;
public ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | c1216e8253bc2480db6d333b3860784e | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
static int i, j, k, n, m, t, y, x, sum = 0;
static long mod = 1000000007;
static FastScanner fs = new FastScanner();
static PrintWriter out = new PrintWriter(System.out);
static String str;
static long ans;
public stati... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 9721d570fbfae785ad09a5ec5bdc05c7 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class CF1603_D1_B {
public static void main(String[] args) {
FastScanner scanner = new FastScanner();
int t = scanner.nextInt();
for (int i = 0; i <... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | e78ac9326c0d270abdd58d0988717b7b | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
private static final MyWriter writer = new MyWriter();
private static final MyReader scan = new MyReader();
public static void main(String[] args) throws Exception {
Main main = new Main();
int q = scan.nextInt(); while (q-- ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 3d8196e03a545b0deb9738c57d45cd5c | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
while(T-- > 0) {
StringTokenizer st = new StringTokenizer(br.readLine... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 41dfa5be05946b7713e8eef44a3eda97 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class modmode{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int T = Integer.parseInt(br.readLine());
while(T-- > 0){
StringTokenizer st = new StringTokenizer(br.readLine());
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | f3f10ba1974300d572d4fa7276a8d41f | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /*
Challenge 1: Newbie to CM in 1year (Dec 2021 - Nov 2022) 🔥 5* Codechef
Challenge 2: CM to IM in 1 year (Dec 2022 - Nov 2023) 🔥🔥 6* Codechef
Challenge 3: IM to GM in 1 year (Dec 2023 - Nov 2024) 🔥🔥🔥 7* Codechef
Goal: Become better in CP!
Key: Consistency!
*/
import java.util.*;
import ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 0417c3fb5e71ac1d658facf1829a2199 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
PrintWriter write... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | ee1dab84bf66571d73237bee125c3025 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.*;
import java.util.*;
public class solution {
public static void main(String[] args) {
FScanner sc = new FScanner();
//Arrays.fill(prime, true);
//sieve();
int t=sc.nextInt();
while(t-->0) {
long x=sc.nextInt();
long y=sc.nextInt();
long ans=0;
if(x==2)
ans=2;
else if(x<y... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | a47b2f5ee8831bd36d7a94842b6bc151 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
/**
* #
*
* @author pttrung
*/
public class B_Ro... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7d9eb38f55db584696790c24cb294888 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.text.DecimalFormat;
import java.util.*;
public class Solution {
static BufferedReader bf;
static PrintWriter out;
static Scanner sc;
static StringTokenizer st;
static long mod = (long)(1e9+7);
static long mod2 = 998244353;
static long fact[] = new long[1000001];
static ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 9f5981138ed1aec54f5b5d522a98293a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603B
{
public static void main(String... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | e9612a817ac15ea867a79e7468c75589 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.*;
import java.rmi.MarshalException;
import java.util.*;
public class ModerateModular{
static long mod = 1000000007L;
static MyScanner sc = new MyScanner();
static void solve() {
long x = sc.nextLong();
long y = sc.nextLong();
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 8cf7525bc8e43930c4c144fe49f678f2 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.lang.*;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while(t-->0){
int x = scn.nextInt();
int y = scn.nextInt();
if(x>y)... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7ba6d28ab7fb66a082661a16dc205e70 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Codechef {
public static void main(String[] args) throws java.lang.Exception {
FastReader in = new FastReader(System.in);
StringBuilder sb = new StringBuilder();
int t = 1;
t = in.nextInt();
while (t > 0) {
--t;
int x =... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 673fce6b512bd7cf30cdadbfa8452b04 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class aa {
//--------------------------INPUT READER--------------------------------//
static class fs {
public BufferedReader br;
StringTokenizer st = new StringTokenizer("");
public fs() { this(System.in); }
public fs(Inpu... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 802eddbfcfff33d7eb9a6e31f9c50073 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
static PrintWriter pw;
static Scanner sc;
static long ceildiv(long x, long y) { return (x+y-1) / y; }
static int mod(long x, int m) { return (int) ((x%m + m) % m); }
static void put(Map<Integer, Integer> map, Integer p){if(map.contai... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 2dbb9f6893544eb4732a435e8d697c0b | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class B1603 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while (t-- > 0) {
long x = sc.nextLong();
long y = sc.nextLong();
/... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 45171cf0de823a1d197641df4c131ed5 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.Scanner;
public class B1603 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
StringBuilder out = new StringBuilder();
int T = in.nextInt();
for (int t=0; t<T; t++) {
int x = in.nextInt();
int y = in.n... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 1d04f8bd5fcb599b21c803ff04352138 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Throwable {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readL... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 3ee2c883e974e6dc18b5eb8080f5b727 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | // package faltu;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.Map.Entry;
public class Main {
public static int upperBound(long[] arr, long m, int l, int r) {
while(l<=r) {
int mid=(l+r)/2;
if(arr[mid]... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 0c54c63b774c9976ed720fbcc230dbc5 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
// cd C:\Users\Lenovo\Desktop\New
//ArrayList<Integer> a=new ArrayList<>();
//List<Integer> lis=new ArrayList<>();
//StringBuilder ans = new StringBuilder();
//HashMap<Integer,Integer> map=new HashMap<>();
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | bf6ff0bc30d81d7762f43f0ad39dc80e | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /* DHUOJ solution #554790 @ 2022-03-26 17:12:32.571 */
import java.util.Scanner;
public class text1 {
public static void main(String[] args) {
Scanner reader=new Scanner(System.in);
int N = reader.nextInt();
long x, y;
long []a=new long[N];
for (int i = 0; i < N; i+... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 57a8199747f27888cd1e5e4098ae2ca3 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /* DHUOJ solution #554777 @ 2022-03-26 17:12:28.175 */
import java.util.Scanner;
public class text1 {
public static void main(String[] args) {
Scanner reader=new Scanner(System.in);
int N = reader.nextInt();
long x, y;
long []a=new long[N];
for (int i = 0; i < N; i+... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | bebb7fbfb129273b183def982a7df81a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /* DHUOJ solution #554776 @ 2022-03-26 17:12:28.165 */
import java.util.Scanner;
public class text1 {
public static void main(String[] args) {
Scanner reader=new Scanner(System.in);
int N = reader.nextInt();
long x, y;
long []a=new long[N];
for (int i = 0; i < N; i+... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | c1f86e5e61133678e8949f442e86add2 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
int tc = io.nextInt();
for (int i = 0; i < tc; i++) {
solve();
}
io.close();
}
private static void solve() throws Exception {
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 317cd32c9282856529258fa1edbcef28 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class r752b {
public static void main(String[] args) {
FastScanner scan=new FastScanner();
PrintWriter out=new PrintWriter(System.out);
//ev... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 8c016fb72f9c97d9f17710c17a408e06 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 90a5f0f6cc5c1b7fd69cd19114dfce82 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class D {
public static void main(String args[]){
FScanner in = new FScanner();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
while(t-->0) {
int x=in.nextInt(),y=in.nextInt();
if(x==y)
out.println(x);
else if(x>y)
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 8d627188ab383453727e6208e68a1ac0 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class code{
static class Reader
{
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader()
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | ce09155f505af00d1d95b33840956db4 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.*;
import java.util.*;
public final class Main {
static PrintWriter out = new PrintWriter(System.out);
static FastReader in = new FastReader();
static Pair[] moves = new Pair[]{new Pair(-1, 0), new Pair(0, 1), new Pair(1, 0), new Pair(0, -1)};
static int mod = (int) (1e9 + 7);... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | be9c1cdab3812b7bfc825610f9c30e7a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Locale;
import java.util.StringTokenizer;
public class Solution imple... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | cc3d7983d06f9ce96f1edc9c89c232ab | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(in.readLine());
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 1ee1a46fb091fd3f5aaae8e506a4a69b | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.lang.*;
// StringBuilder uses java.lang
public class mC {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder st = new StringBuilder();
int t = sc.nextInt();
for (int test = 0; test < t;... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 8 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | eaab29cc1aae52bba0c8cc516af65889 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | //package CodeForces.CodeForcesRounds.src.main.java.aarkay.codeforcesrounds.round752;
import java.io.*;
import java.util.*;
public class ModerateModularMode_B {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
out = new PrintWriter(new BufferedOutputStream(System.out)... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | d25a20ff237204c97f178b49c04848ec | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class P1603B {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int t = s.nextInt();
while (t-- > 0) {
long a = s.nextLong();
long b = s.nextLong();
if (a <= b) {
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | cd5a08b67a21f0ab289a48480de42a49 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.Scanner;
import java.util.*;
public class Solution {
static int mod = (int) 1e9 + 7;
static Scanner sc = new Scanner(System.in);
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) {
int cases = Integer.parseInt(sc.next());
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 5d5039e1fa5a7fc349497503f6727318 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.Scanner;
import java.util.*;
public class Solution {
static int mod = (int) 1e9 + 7;
static Scanner sc = new Scanner(System.in);
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) {
int cases = Integer.parseInt(sc.next());
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7b3e58cdc19309acfd9990ef8a1b1d0e | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class pariNa {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
StringBuilder finalAnswer=new StringBuilder();
//finalAnswer.append().append('\n');
int t=sc.nextInt();
outer:
while(t-->0){
// long n=sc.nextLong();
long ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 5c29a00cf544f7d3c55475fed395936a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
void solve() {
int a = in.nextInt();
int b = in.nextInt();
long res = 0L + a + b;
if (a == b)res = a;
if (a < b) {
res = b - b % a / 2;
}
out.append(res +... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7e715dbeaefaed643a95cd7fcbd902aa | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
void solve() {
int a = in.nextInt();
int b = in.nextInt();
long res = 0L + a + b;
if (a == b)res = a;
if (a < b) {
res = b - b % a / 2;
}
out.append(res +... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | f373fd0bc525607224117eee0bf65728 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class Main {
static int globalVariable = 123456789;
static String author = "pl728 on codeforces";
public static void main(String[] args) {
FastReader ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 89fc1c2518c0fd4fab42c27e8fa97c33 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.*;
import java.util.*;
public class Codeforces{
static long mod = 1000000007L;
// map.put(a[i],map.getOrDefault(a[i],0)+1);
// map.putIfAbsent;
static MyScanner sc = new MyScanner();
//<----------------------------------------------WRITE HERE----------------------------... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 5d61b6e04b2a64e12015c5f1f45049ce | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.lang.*;
import java.util.*;
public class ComdeFormces {
public static boolean gl;
public static ArrayList<Integer> anss;
public static int ans;
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | b8909a4c66fc14ee7334526aba74acd9 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
import static java.lang.Math.*;
import static java.lang.Math.ceil;
import static java.util.Arrays.sort;
public class Round9 {
public static void main(String[] arg... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 06f878014d490f1fdae886992fbaab87 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main{
static final Random random=new Random();
static long mod=1000000007L;
static HashMap<String,Integer>map=new HashMap<>();
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 3cef847819a98d54efff61c65b71681f | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.Scanner;
public class E1603B {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
StringBuilder sb = new StringBuilder();
while (t-- > 0) {
int x = scn.nextInt();
int y = scn.nextInt... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 5140b854e52bcde862bb0b4f1a3a9976 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /*
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
___/`---'\___
.' \\| |// '.
/ \\||| : |||// \
/ _||||| -:- |||||- \
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | de3c1ccf3d933bacbe136c984ad2d388 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static AReader scan = new AReader();
static int gcd(int a,int b){
return b == 0 ? a : gcd(b,a%b);
}
static void solve() {
int x = scan.nextInt(... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 423e3510d7a3a57129405ffd84240bdc | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class B1603 {
public static void main(String[] args) throws IOException, FileNotFoundException {
// Scanner in = new Scanner(new File("test.in"));
Kattio in = new Kattio();
int T = in.nextInt();
while(T > 0){
T--;
long X = in.nextLong();
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 806227d219821db30e15ddb09e78657d | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class A1603 {
public static void main(String[] args) throws IOException {
BufferedReader rd = new BufferedReader(new InputStreamReader(System.in... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 8d9fb773fabe54b09f59ba82bbb6661c | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class cf1603b {
public static void main(String[] args) throws IOException {
int t = ri();
next: while (t --> 0) {
int x = rni(), y = ni();
if (y < x) ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 9482ee31b654dd37467d7fedb905f780 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class mmm {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
StringTokenizer st =... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 4cabc8aad5b88d0d7d2b5da583e72070 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | // import java.io.BufferedReader;
// import java.io.InputStreamReader;
// public class Main{
// static int m=(int)1e9+7;
// public static void main(String[] args) throws Exception{
// BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
// int t=Integer.parseInt(br.rea... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | bf004dbdcb8b886e7db5656a33c598d1 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Moderate_Modular_Mode {
static FastScanner fs;
static FastWriter fw;
static boolean checkOnlineJudge = System.getProperty("ONLINE_JUDGE") == null;
private static final int[][] kdir = new int[][]{{-1, 2}, {-2, 1}, {-2, -1}, {-1, -2}, {1, -2},... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 46f0841e1a025918827b614443887e3b | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Throwable {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | fa4edf8a9388da9ac28d5b8f3b8ba28b | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class A {
static class fast {
BufferedReader br;
StringTokenizer st;
public fast() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = ne... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 157127eadd7a971b0d103d401aa759a3 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
//import java.lang.*;
import java.io.*;
public class Solution {
static long[] fac;
static int m = (int)1e9+7;
static int c = 1;
// static int[] x = {1,-1,0,0};
// static int[] y = {0,0,1,-1};
// static int cycle_node;
public static void main(String[] args) thro... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 17f32c65d42739c27b30761960f36ff2 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /*
*** author: cypher70
*/
import java.io.*;
import java.util.*;
public class sol {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String nex... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 21fb0cdb66385081008b983967b8d337 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
// when can't think of anything -->>
// 1. In sorting questions try to think about all possibilities like starting from start, end, middle.
// 2. Two pointers, brute force.
// 3. In graph query questions try to solve it reversely or try to proces... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 35011f1afe4f207b5977d59b8cac6c7c | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.sql.Statement;
import java.text.DecimalFormat;
import java.util.*;
public class Main {
static class Pair
{
long val,ind;
public Pair(long val,long ind)
{
this.val=val;
this.ind=ind;
}
public String toS... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 12f7420368410d609b1a054f1a72465c | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Mod {
public static void main(String[] args) throws Exception {
FastIO in = new FastIO();
int t = in.nextInt();
for (int tc=0; tc<t; tc++) {
long x = in.nextLong();
long y = in.nextLong();
if (x>y) {
System.out.println(x+y);
}
else... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 44f6d1f65f3fb5715078cbc5ebb0a2a5 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | /*
Rating: 1367
Date: 17-01-2022
Time: 16-37-01
Author: Kartik Papney
Linkedin: https://www.linkedin.com/in/kartik-papney-4951161a6/
Leetcode: https://leetcode.com/kartikpapney/
Codechef: https://www.codechef.com/users/kartikpapney
*/
import java.util.*;
import java.io.BufferedRe... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | d4fc930596b3edb7305f52c2b66652ac | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.Scanner;
import java.util.Arrays;
import java.util.Comparator;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main{
static class FastReader {
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 6fc822a057e93ec9497ef9a48b6388bd | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
public class b {
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 278d62c15fbd6df4e4af37322eb00650 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
static PrintWriter out=new PrintWriter((System.out));
static Reader sc=new Reader();
public static void main(String args[])throws IOException {
int t=sc.nextInt();
for (int i = 1;i <= t;i++) {
solve();
}
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | a232a42db914a0d1c0e7c9fe201ae1b9 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class B{
static void print(long x, long y) {
for (int i = 1; i <= y; i++) {
out.print(i%x + " ");
}
out.println();
for (int i = 1; i <= y; i++) {
out.print(y%i + " ");
}
out.println();
}
public static vo... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 15ca6c2075b72bcb253fc47fab63dd2a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
import java.text.*;
public class CF_1603_B{
//SOLUTION BEGIN
void pre() throws Exception{}
void solve(int TC) throws Exception{
long X = nl(), Y = nl();
long N = f(X, Y);
hold(N%X == Y%N);
pn(N);
}
long f(long X, l... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | be8618b1ccd01cb4ceab3cd00f28888e | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
public class weird_algrithm {
static BufferedWriter output = new BufferedWriter(
new OutputStreamWriter(... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 502fca1b034ad3f6ecca7fda608c3de9 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.StringTokenizer;
/**
* Accomplished using the EduTools plugin by JetBrains https://plugins.jetbrains.com/plugin/10081-edutools
*
* To modify the template, go to Preferences -> Editor -> File and Code Templates -> Other
*/
public class Main {
private static int avg(int x, int ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | e1d2a3bb009a295ee331f10386a438bc | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.io.*;
import java.util.*;
public class cp {
static int mod=(int)1e9+7;
// static Reader sc=new Reader();
static FastReader sc=new FastReader(System.in);
static int[] sp;
static int size=(int)1e6;
static int[] arInt;
static long[] arLong;
public static void main(String[] args) th... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | fc737c85772ef4f5b9754578f3db999f | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes |
import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class Main {
private static FS sc = new FS();
private static class FS {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
whi... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | c4c320954676a1c37d40d6a14acfefe7 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 1f352024e7bfa3cf0346eec33ee91a88 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class B1603 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
// Test later
BufferedReader f = new BufferedReader(... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 4b5c14de30c9e734595f0c5d479b479a | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
public class Contest1604D
{
static class InputReader {
BufferedReader reader;
StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
String next() { // re... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 91ea5b4717c21ee666a9d327d2239c7c | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.io.UncheckedIOException;
import java.io.Closeable;
import java.io.InputStream;
/**
* Built... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 250db33f83318283fd9890238afee598 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
import java.awt.Point;
public class Main{
static int mod = (int) (Math.pow(10, 9)+7);
static final int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
static final int[] dx8 = { -1, -1, -1, 0, 0, 1, 1, 1 }, dy8 = { -1, 0, 1, -1, 1, -1, 0, 1 };
static final int[] d... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7e3c2bfd168c472721bb212610fb92ca | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
/**
*
* @author M1ME
*
*/
public class D {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder st = new StringBuilder();
int t = sc.nextInt();
for (int test = 0; test < t; test++) {
int n = sc.nextInt();
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | e02701f0a359735b7f205347c4327bd3 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.*;
import java.util.*;
import java.lang.*;
public class Main {
public static void main(String[] args) throws Exception {
int T = r.readInt();
for (int t = 0; t < T; t++) {
long x = r.readLong(), y = r.readLong();
long n;
if (y % x == ... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | db05b104c568a0b592bac460fef875c1 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class SolutionB extends Thread {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 77deff7a0b2d3edc1baaba1527013527 | train_110.jsonl | 1635604500 | YouKn0wWho has two even integers $$$x$$$ and $$$y$$$. Help him to find an integer $$$n$$$ such that $$$1 \le n \le 2 \cdot 10^{18}$$$ and $$$n \bmod x = y \bmod n$$$. Here, $$$a \bmod b$$$ denotes the remainder of $$$a$$$ after division by $$$b$$$. If there are multiple such integers, output any. It can be shown that s... | 256 megabytes | import java.util.*;
import java.io.*;
public class _752 {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
int t = sc.nextInt();
while (t-- > 0) {
long x = sc.nextLo... | Java | ["4\n4 8\n4 2\n420 420\n69420 42068"] | 1 second | ["4\n10\n420\n9969128"] | NoteIn the first test case, $$$4 \bmod 4 = 8 \bmod 4 = 0$$$.In the second test case, $$$10 \bmod 4 = 2 \bmod 10 = 2$$$.In the third test case, $$$420 \bmod 420 = 420 \bmod 420 = 0$$$. | Java 11 | standard input | [
"constructive algorithms",
"math",
"number theory"
] | a24aac9152417527d43b9b422e3d2303 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains two integers $$$x$$$ and $$$y$$$ ($$$2 \le x, y \le 10^9$$$, both are even). | 1,600 | For each test case, print a single integer $$$n$$$ ($$$1 \le n \le 2 \cdot 10^{18}$$$) that satisfies the condition mentioned in the statement. If there are multiple such integers, output any. It can be shown that such an integer always exists under the given constraints. | standard output | |
PASSED | 7809ae91430638183c4caae3704debf1 | train_110.jsonl | 1635604500 | It was October 18, 2017. Shohag, a melancholic soul, made a strong determination that he will pursue Competitive Programming seriously, by heart, because he found it fascinating. Fast forward to 4 years, he is happy that he took this road. He is now creating a contest on Codeforces. He found an astounding problem but h... | 512 megabytes | import java.util.*;
import java.io.*;
public class cf {
static long modulo(long a, long b, long c) {
long x=1;
long y=a;
while(b > 0){
if(b%2 == 1){
x=(x*y)%c;
}
y = (y*y)%c; // squaring the base
b /= 2;
}
return x%c;
}
... | Java | ["6\n2 2 0\n2 1 1\n3 2 3\n69 69 69\n2017 10 18\n5 7 0"] | 4 seconds | ["6\n1\n15\n699496932\n892852568\n713939942"] | NoteIn the first test case, the valid sequences are $$$[1, 2]$$$, $$$[1, 3]$$$, $$$[2, 1]$$$, $$$[2, 3]$$$, $$$[3, 1]$$$ and $$$[3, 2]$$$.In the second test case, the only valid sequence is $$$[0, 0]$$$. | Java 11 | standard input | [
"combinatorics",
"dp",
"implementation",
"math"
] | aa08245d8959ed3901eb23f5b97b1b7e | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains three space-separated integers $$$n$$$, $$$k$$$, and $$$x$$$ ($$$1 \le n \le 10^9$$$, $$$0 \le k \le 10^7$$$, $$$0 \le x \lt 2^{\operatorname{min}(20, k)}$$$). It is ... | 2,700 | For each test case, print a single integer — the answer to the problem. | standard output | |
PASSED | f072421ed23a809d10c93fd19596e013 | train_110.jsonl | 1635604500 | It was October 18, 2017. Shohag, a melancholic soul, made a strong determination that he will pursue Competitive Programming seriously, by heart, because he found it fascinating. Fast forward to 4 years, he is happy that he took this road. He is now creating a contest on Codeforces. He found an astounding problem but h... | 512 megabytes | import java.util.*;
import java.io.*;
public class cf {
static long modulo(long a, long b, long c) {
long x=1;
long y=a;
while(b > 0){
if(b%2 == 1){
x=(x*y)%c;
}
y = (y*y)%c; // squaring the base
b /= 2;
}
return x%c;
}
p... | Java | ["6\n2 2 0\n2 1 1\n3 2 3\n69 69 69\n2017 10 18\n5 7 0"] | 4 seconds | ["6\n1\n15\n699496932\n892852568\n713939942"] | NoteIn the first test case, the valid sequences are $$$[1, 2]$$$, $$$[1, 3]$$$, $$$[2, 1]$$$, $$$[2, 3]$$$, $$$[3, 1]$$$ and $$$[3, 2]$$$.In the second test case, the only valid sequence is $$$[0, 0]$$$. | Java 8 | standard input | [
"combinatorics",
"dp",
"implementation",
"math"
] | aa08245d8959ed3901eb23f5b97b1b7e | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. The first and only line of each test case contains three space-separated integers $$$n$$$, $$$k$$$, and $$$x$$$ ($$$1 \le n \le 10^9$$$, $$$0 \le k \le 10^7$$$, $$$0 \le x \lt 2^{\operatorname{min}(20, k)}$$$). It is ... | 2,700 | For each test case, print a single integer — the answer to the problem. | standard output | |
PASSED | 1f990f607164dbf7e048339be901f4e2 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.util.*;
import java.util.function.*;
import java.io.*;
// you can compare with output.txt and expected out
public class Round752Div1C {
MyPrintWriter out;
MyScanner in;
// final static long FIXED_RANDOM;
// static {
// FIXED_RANDOM = System.currentTimeMillis();
// }
final static String ... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 17 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 2ac5f964e36134178e7ac8a639ea914b | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603C
{
static final long MOD = 998244... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 2911159c53600fcfe3addef979c406b5 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603C
{
static final long MOD = 998244... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | ad00fefef3a9287f6120ef0809b44d17 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603C
{
static final long MOD = 998244... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 5c421b108e3624cffc70fc259f49b3be | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603C
{
static final long MOD = 998244... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | fc8fd4e9a408022498efc7db7d6acfd4 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | /*
I am dead inside
Do you like NCT, sKz, BTS?
5 4 3 2 1 Moonwalk
Imma knock it down like domino
Is this what you want? Is this what you want?
Let's ttalkbocky about that :()
*/
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class x1603C
{
static final long MOD = 998244... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 96997eebe21c0d81d9d7c8705f970334 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Locale;
import java.util.StringTokenizer;
public class Solution2 impl... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | cc5868d32c3bff7889016d1636516bd6 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.Locale;
import java.util.StringTokenizer;
public class Solution imple... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | bb8ea2dad5c6df70f083973ed8074bc2 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.util.*;
import java.lang.*;
// StringBuilder uses java.lang
public class mC {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder st = new StringBuilder();
int t = sc.nextInt();
long MOD = 998244353;
... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 8 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | b551f4d142944d349118fe09171cabce | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.util.*;
import java.io.*;
public class _1604_E {
static final long MOD = 998244353;
public static void main(String[] args) throws IOException {
Reader in = new Reader();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
while(t-- > 0) {
... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 11 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 6c49059084d6c1d4b898f727b94acadd | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.util.*;
import java.io.*;
public class _1604_E {
static final long MOD = 998244353;
public static void main(String[] args) throws IOException {
Reader in = new Reader();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
while(t-- > 0) {
... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 11 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | 3cf08b4eb1ae0e355dcf885437d5a9d3 | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
static int MOD = 998244353;
// After writing solution, quick scan for:
// array out of bounds
// special cases e.g. n=1?
// npe, particularly in maps
//
// Big numbers arithmetic bugs:
// int... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 11 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output | |
PASSED | aaafa80b40639f180ce3323d3b24df0d | train_110.jsonl | 1635604500 | For an array $$$b$$$ of $$$n$$$ integers, the extreme value of this array is the minimum number of times (possibly, zero) the following operation has to be performed to make $$$b$$$ non-decreasing: Select an index $$$i$$$ such that $$$1 \le i \le |b|$$$, where $$$|b|$$$ is the current length of $$$b$$$. Replace $$$b... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;
public class A1603 {
private static final int P = 998244353;
private static final int M = 100000;
pri... | Java | ["4\n3\n5 4 3\n4\n3 2 1 4\n1\n69\n8\n7264 40515 28226 92776 35285 21709 75124 48163"] | 4 seconds | ["5\n9\n0\n117"] | NoteLet $$$f(l, r)$$$ denote the extreme value of $$$[a_l, a_{l+1}, \ldots, a_r]$$$.In the first test case, $$$f(1, 3) = 3$$$, because YouKn0wWho can perform the following operations on the subarray $$$[5, 4, 3]$$$ (the newly inserted elements are underlined):$$$[5, 4, 3] \rightarrow [\underline{3}, \underline{2}, 4,... | Java 11 | standard input | [
"dp",
"greedy",
"math",
"number theory"
] | f760f108c66f695e1e51dc6470d29ce7 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases. The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$). The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$). It is ... | 2,300 | For each test case, print a single integer — the sum of extreme values of all subarrays of $$$a$$$ modulo $$$998\,244\,353$$$. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.