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 | acf7520b0ebae7ec633a054f6099928a | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-->0) {
long computers = sc.nextLong();
long cables = sc.nextLong();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | b6f70a09cb56c63e2ea33e82ce8ea544 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-->0) {
long computers = sc.nextLong();
long cables = sc.nextLong();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 537d5b111d0c9175c2932244031b16ff | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.*;
public class B {
static long gcd(long n, long m) {
if (m == 0)
return n;
return gcd(m, n % m);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder str = new StringBuilder();
int t = sc.nextInt();
for (int xx = 0; xx < t; xx++) ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 3680257fad0573b7f289410053a3921b | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class div2 {
static boolean a=false;
public static void main(String[] args) throws IOException {
Scanner sc=new Scanner(System.in);
long t=sc.nextLong();
while(t-->0)
{
long n=sc.nextLong();
long k=sc.nextLong();
if(k==1)
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 8e28ad26658e1d005fdc902f380807cd | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class div2 {
static boolean a=false;
public static void main(String[] args) throws IOException {
Scanner sc=new Scanner(System.in);
long t=sc.nextLong();
while(t-->0)
{
long n=sc.nextLong();
long k=sc.nextLong();
if(k==1)
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e407cd3b8ee054489b26749e2bcba2f7 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class first {
static long expow(int x,int y)
{
long temp=1;
while(y>0)
{
if(y%2==1)
{
temp*=x;
}
x*=x;
y>>=1;
}
return temp;
}
public static void... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 475737e91d8a42ee7f013279c0f14ddc | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Random;
import java.util.StringTokenizer;
public class Solution4 {
public stati... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 42c22c74bb488ccf7ce1bf543d39b687 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static long mod = 1000000007;
static long max ;
static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
public static void main(String[] args) throws IOException {
FastReader sc = new FastReader();
int t = sc.nextIn... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 875740a1e6c3c45ff126a0c9a9ce1ef9 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.math.BigInteger;
import java.util.*;
import java.io.*;
public class B_Update_Files {
public static void main (String[] args) {
FastReader scan = new FastReader();
int t = scan.nextInt();
while (t-- > 0) {
long n = scan.nextLong(), k = scan.nextLong();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | cf6fb87428fdb1f862788f5e1e1a612d | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class SolutionB{
public static void main(String[] args) throws Exception{
Fast sc=new Fast();
PrintWriter out=new PrintWriter(System.out);
int t=sc.nextInt();
while(t-->0){
long n=s... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a6cc96acb261c4a3f1468763d47fb92c | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class B {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamRe... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 75d8281a5e498cf41d1bab91c7dddf5d | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.Arrays;
import java.util.*;
import java.util.Scanner;
import java.util.StringTokenizer;
public class copy {
public static boolean checker(long[] arr, long K, long diff) {
long collect = 0;
for (int i = 0; i < arr.length; i++) {
if (... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 8d099ef80676b7fa278d80d271a4e06a | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.*;
import static java.lang.Long.parseLong;
//Make it Divisible by 25
//-00
//-25
//-50
//-75
public class Main{
public static void main(String[] args) throws IOException, NumberFormatException {
BufferedReader br = new BufferedRea... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | f7dfd6577eaac4f1375a133c87a76227 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
// Working program with FastReader
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.lang.*;
public class B_Update_Files {
static class FastReader {
BufferedRe... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 98f2f80551cbc6e2c14053ac0d355501 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class codeforces {
public static void main(String[] args) throws IOException {
FastReader fr = new FastReader();
PrintWriter out = new PrintWriter(System.out);
int t = fr.nextInt();
for(int test = 0;test < t;test++) {
long n = fr.nextLong... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 506425381f52dc6046599c37c7bce661 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.Scanner;
/**
*
* @author Dell
*/
public class AA {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = Integer.parseInt(sc.nextLine());
while (t-- > 0) {
long n = sc.nextLong();
long k = sc.nextLon... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | f3b1e0fad50972628b31b244bd911bb9 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 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.StringTokenizer;
/**
*
* @author eslam
*/
public class UpdateFiles {
static class FastReader {
BufferedReader b... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9c35907f3322e3c503cd443323b71f7b | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class BUpdateFiles {
public static void main(String args[]) throws Exception {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
int t=Integer.parseInt(in.readLi... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | fccf21217216749b0d4816ab9bd1d08f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
import java.math.BigInteger;
import static java.lang.Math.min;
import static java.lang.Math.max;
import static java.lang.Math.abs;
public class CodeForces {
static int mod=1000000000+7;
static FastScanner in=new FastScanner();
static PrintWriter out=new PrintWriter(... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | b2e30ba3d23ebcf45db7256ac80d6d08 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //package com.company;
import java.io.*;
import java.util.*;
public class Main{
static boolean[] primecheck = new boolean[1000002];
static ArrayList<Integer> adj[];
static int[] vis;
static long cnt = 0;
static long mod = (long)1e9 + 7;
public static void main(String[] args) {
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | f8ee33de33ae433fc5cb510eb38b261b | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.*;
import java.io.*;
public class Main {
static int mod = 1000000007;
static void read(int arr[], int start, int end, FastReader in) {
for (int i = start; i < end; i++) {
arr[i] = in.nextInt();
}
}
static int sumArr(int arr[]) {
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9f9e1aa8f23e8cd9198bd3f3ec0f82a0 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.math.BigInteger;
import java.io.*;
public class Main implements Runnable {
public static void main(String[] args) {
new Thread(null, new Main(), "whatever", 1 << 26).start();
}
private FastScanner sc;
private PrintWriter pw;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | bed741277f518f341cc3c948e7ad9a62 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;
public class UpdateFiles {
static FastScanner in;
static PrintWriter out;
public static void... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 83229dd23db85eaf25cb901e9af8f859 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
for(int g=1;g<=t;g++) {
long n=sc.nextLong();
long k=sc.nextLong();
long time=0;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | ee272de0070820a56f2ea2a9fea31d3e | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*package whatever //do not write package name here */
import java.io.*;
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
long n=sc.nextLong();
long k=sc.nextLong();
long ans=0;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5986d92aa4180cdc9af7796e5acab2f6 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*package whatever //do not write package name here */
import java.io.*;
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
long n=sc.nextLong();
long k=sc.nextLong();
long ans=0;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 48e2a9ef222b6bff5b8b7755d3dc8dab | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*package whatever //do not write package name here */
import java.io.*;
import java.util.*;
public class GFG {
public static void main (String[] args) {
Scanner In=new Scanner(System.in);
int x=In.nextInt();
while(x-->0) {
long y=In.nextLong();
long t=In.nextLo... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7541b8604df450103a834e9c30198e00 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.awt.*;
import java.io.*;
import java.util.*;
public class Main {
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
static StringBuilder str = new StringBuilder();
public static void main(String[] args) throws NumberFormatException, IOException {
int t = In... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | b697e7569c523bfd3f77bd1c74455925 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | // package codechef;
import java.io.*;
import java.util.*;
public class cp_2 {
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;
public static void main(String[] args) throws IOExcept... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 66140ddfb07df5d5487fe5c3b1074e66 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | // package codechef;
import java.io.*;
import java.util.*;
public class cp_2 {
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;
public static void main(String[] args) throws IOExcept... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e589bb6195fcef5ebdba6cf1a40fc7fd | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.Scanner;
public class Update_Files {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int t = sc.nextInt();
while(t>0){
long n= sc.nextLong();
long m = sc.nextLong();
System.out.println(solve(n... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7f6c951981d12746a1c44f5390d7c140 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class HelloWorld{
public static void main(String []args){
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
String str=sc.next();
long n=Long.parseLong(str);
String str1=sc.next();
long k=Long... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | f732057735c0697e3e5a01f938fb830c | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 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\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5926b188e124b49a75d3988f17011c09 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codeforces
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(Syst... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a1a920a7c48facf1248e1105832db76f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class B {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | c0238a6991aa17c92ec532d7da10ad9f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
static long mod = (int)1e9+7;
public static void main (String[] args) throws java.lang.Exception
{
FastReader sc =new FastReader();
int t=sc.nextInt();
// int t=1;
while(t-->0... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a57d11053b8b3416890dfea426768cbf | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Test{
static FastReader scan;
static void solve(){
long n=scan.nextLong(... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | d2c4e51ce6b55a2c9f9a7e3dfde77d32 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
public class Test{
static FastReader scan;
static void solve(){
long n=scan.nextLong(... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a36bc5d2046870226eddcfff6f1da1c6 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class Faily_obnovlenie {
public static void main(String[] args) {
Scanner go=new Scanner(System.in);
long t=go.nextInt();
for(int j=0;j<t;j++) {
long n = go.nextLong();
long k = go.nextLong();
long hour = result... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 0dd9dffdfc2ca581fba07d74d2cc564f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
public class Main implements Runnable {
static FastReader sc;
static PrintWriter out;
static int mod = 1000000007, inf = (int) 1e9, minf = -(int) 1e9;
static long infL = (long) 1e18, minfL = -(long) 1e1... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7e0c01b976159dc5d14387aff7d16f49 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*
_oo0oo_
o8888888o
88" . "88
(| -_- |)
0\ = /0
___/`---'\___
.' \\| |// '.
/ \\||| : |||// \
/ _||||| -:- |||||- \
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a3904f21666608dd933ae9681b24660e | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class CP {
static Scanner s = new Scanner(System.in);
static class pair{
long key;
int count;
pair(long key , int count){
this.count = count;
this.key = key;
}
}
static class sort impleme... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | c0de1cdcf7502d74002796c2ef246549 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.lang.Math;
import java.lang.reflect.Array;
import java.util.*;
import javax.swing.text.DefaultStyledDocument.ElementSpec;
public final class Solution {
static BufferedReader br = new BufferedReader(
new InputStreamReader(System.in)
);
static BufferedWriter bw = new B... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 1451e99c72503be69d3a248f5dc59cc5 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.Rounding... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | fb0813a7686dbdce930edadfcf89edf4 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.Rounding... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9d3a62d6eef61db68e2b82b31f57fc0f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.Rounding... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e8076477e600ad3223ab88865ac02ffe | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /**
* @author -- Sourav Joshi
*/
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;
import static java.lang.Math.*;
public class Solution {
/*--------------------------------------------------------------------------------------... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 26e2fd448cffb206ce252eaeb521b74f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /**
* @author -- Sourav Joshi
*/
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;
import static java.lang.Math.*;
public class Solution {
/*--------------------------------------------------------------------------------------... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5342b5b50d4331652a154387016cf9b6 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | f1be3a915954adb93cd4184801b5d8c3 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t!=0... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5b6c51cabdbe806cab56375a6f6acaa3 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class B {
public static void main (String[] args) throws IOException {
Kattio io = new Kattio();
int t = io.nextInt();
for (int ii=0; ii<t; ii++) {
long n = io.nextLong();
long k = io.nextLong();
long time = 0;
long total = 1;
long pow = 1;
while (... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | bcfcf9f6357c679404906abc174f11f6 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class UpdateFiles {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0) {
long a=sc.nextLong();
long b=sc.nextLong();
long count=0;
if(a==0) {
System.out.println(0);
continue;
}
if(a==1) {... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7319112ca16fe7af0d4b5915f349c588 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Test{
//Global declarations
final static FastReader in = new FastReader();
final static PrintWriter out = new PrintWriter(System.out);
public static void helperFunction(String s) {
//Long range is -10^18 to 10^18 and ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 61fbb0ae1ead670b6960b4181fb7dd63 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Test{
//Global declarations
final static FastReader in = new FastReader();
final static PrintWriter out = new PrintWriter(System.out);
public static void helperFunction(String s) {
//Long range is -10^18 to 10^18 and ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 561669810763b7b6fe657ae035a75875 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
public class Substitute{
//Global declarations
final static FastReader in = new FastReader();
final static PrintWriter out = new PrintWriter(System.out);
public static void helperFunction() {
//Long range is -10^18 to 10^18 and is 64 bi... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9998a4109f14c3dcc7ca2e4043844a3a | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t;
long n,k,i,ans;
t=sc.nextInt();
while (t>0)
{
n=sc.nextLong();
k=sc.nextLong();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7f66cbc2cc2b08a063b00d797131c830 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class codeforces {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int mod = (int) (1e9 + 7);
int t = sc.nextInt();
while (t-- > 0) {
long n = sc.nextLong();
long k = sc.next... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 3076a56ab3c9731a24322e7db73ddeb6 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class updateFiles {
public static void main(String[] args) {
MyScanner sc= new MyScanner();
int input =sc.nextInt();
for(int i = 0 ; i < input;... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | aac5b8ba9c043fb4e6154fae7edd9dec | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class B {
public static void main(String[] args)
{
FastScanner sc=new FastScanner();
int t=sc.nextInt();
PrintWrit... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 07a2283e7c73f1e8e68719cb7755ee99 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import static java.lang.Math.*;
import static java.lang.System.out;
import java.util.*;
import java.io.*;
import java.math.*;
/*
-> Give your 100%, that's it!
-> Rules To Solve Any Problem:
1. Read the problem.
2. Think About It.
3. Solve it!
*/
public class Template {
static int mod =... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | bbb775e76a3d0cd965aefea6c3453d8f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import static java.lang.System.out;
import java.util.*;
import java.io.*;
import java.math.*;
/*
-> Give your 100%, that's it!
-> Rules To Solve Any Problem:
1. Read the problem.
2. Think About It.
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 640c5855cd22c67f190d7fec142254f1 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
static BufferedReader br;
public static void main (String[] args) throws java.lang.Exception
{
br = ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9c495a63775f0431574c755806251af3 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class cp
{
static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader()
{
din = new DataInputStream(System.in);
buffer = new byte[BUFF... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e1d9eb33cf58483984b2a8b945b05f08 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class Code
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0)
{
long n=sc.nextLong(), k=sc.nextLong();
long hour=0, copied=1;
wh... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 269bcfd81f3af39cfd3bad2f9a59f0cf | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.function.Function;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 46807e96442c1f2d10a87151438707dd | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
/**
__ __
( _) ( _)
/ / \\ / /\_\_
/ / \\ / / | \ \
/ / \\ / / |\ \ \
/ / , \ , / / /| \ \
/ / |\_ /| / / / \ \_\
/ / |\/ _ '_| \ / / / \ \\
| / |/ 0 \0\ / | | \ ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | a68a18c067a950a6757be0a59b57295e | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main1606B {
public static void main(String[] args) {
final FastScanner in = new FastScanner(System.in);
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 4fdd64778dc053aace22c682666e59a9 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //package codeforces;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class codeforces{
public static void main(String[] args){
FastScanner s=new FastScanner();
PrintWriter out=new PrintWriter(System... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7c293e4d6a9b2785ee7ac80d63723da1 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class Main {
//----------- StringBuilder for faster output------------------------------
static StringBuilder out = new StringBuilder();
public static void main(String[] args) {
FastScanner fs=new FastScanner();
/****** CODE STARTS HERE *****/
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 38ee4ebad057e611a91182671210b561 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //package codeforces;
import java.util.Scanner;
public class UpdateFiles {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while (t-- > 0) {
long n = in.nextLong();
long k = in.nextLong();
lo... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 989160e3d00c4e1f7bdbc72e9fdb2a22 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //import java.io.IOException;
import java.io.*;
import java.util.*;
public class Template {
static InputReader inputReader=new InputReader(System.in);
static void solve()
{
long n=inputReader.nextLong();
long k=inputReader.nextLong();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5f03ed9d271416148444c3eaa073f271 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 36de80bed4e6beac0a02f5b208ed813f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Solution{
static FastScanner sc = new FastScanner();
public static void solve() {
long n=sc.nextLong();
long k=sc.nextLong();
long tmp=1l,res=0l;
while(t... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 0a6b2e640dd75b907fd176fc5bad74be | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class UpdateFiles {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.par... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e044a1cc186986200ffa4202ac12ba4a | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = Integer.parseInt(scanner.nextLine());
for (int x = 0; x < t; x++) {
long n = scanner.nextLong();
long k = scanner.nextLong();... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 45bb759408ac0d41af60ae11bb4bf4dd | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.nio.file.FileStore;
import java.util.*;
public class zia
{
static boolean prime[] = new boolean[25001];
static void BFS(ArrayList<ArrayList<Integer>> adj,int s, boolean[] visited)
{
Queue<Integer> q=new LinkedList<>();
visited[s] = true;
q.add(s)... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 102fddaa9e98a6c2f0b8cd2eaf83e61c | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /**
* @author -- Sourav Joshi
*/
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;
import static java.lang.Math.*;
public class Solution {
/*--------------------------------------------------------------------------------------... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 2a1b4fad1558f1788ebbec7580d22858 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.io.*;
import java.util.*;
public class D {
static int mod=(int)1e9+7;
public static void main(String[] args) {
var io = new Copied(System.in, System.out);
// int... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 412ebea91cebc6384965d1e916c1abef | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;
import java.io.*;
import java.util.*;
public class D {
static int mod=(int)1e9+7;
public static void main(String[] args) {
var io = new Copied(System.in, System.out);
// int... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 24d3ebf6d8734f49fd327586f18b9051 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.lang.reflect.Array;
import java.util.*;
import java.lang.*;
import java.io.*;
public class practice {
public static void main(String[] args) throws IOException {
Reader.init(System.in);
int t = Reader.nextInt();
while(t-->0){
long n = Reader.nextLong(... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | ce031143b1e0daf79b6175d6bc37ad47 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class UpdateFiles {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
long n = sc.nextLong();
long k = sc.nextLong();
long cur = 1;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | de559cddced11d407d2158287fb21f95 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Codechef
{
static class pair
{
long x;
long y;
pair(long x,long y)
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | fe353b606e8aa256a709c0e7d4f44d71 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*
AUTHOR-> HARSHIT AGGARWAL
CODEFORCES HANDLE-> @harshit_agg
FROM-> MAHARAJA AGRASEN INSTITUE OF TECHNOLOGY
>> YOU CAN DO THIS <<
*/
import java.util.*;
import java.io.*;
public class updatefilescf {
public static void main(String[] args) throws Exception {
int t = scn.nextInt();
while... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 93aa882bbd006503a32a5b59fdffe30d | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /*
Rating: ----
Date: 13/11/21/
Time: 6:18 AM
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.BufferedRead... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 45ed306dfcb4a57df5aff6e42aaa9b45 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
public class Solution
{
long log(long num)
{
long count=0;
while(num>0)
{
num=num/2;
if(num>0)
count++;
}
return count;
}
long pow(long exp)
{
if(exp==0)
return 1;... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 2a813b70792264fc9f32856a1bb7c8f5 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
//import java.util.Collections.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
while(n-->0){
Long a,b;
a=sc.nextLong();
b=sc.nextLong()... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | e131ea8dd52bc2f98ffccddc3a3288a7 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class B {
public static void main(String[] args) {
Scanner go = new Scanner(System.in);
int t = go.nextInt();
while (t>=0 && go.hasNext()){
long n = go.nextLong();
long k = go.nextLong();
long hour = answer(n,k)... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 603df554da8e60644b1cbbceafef1619 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class Practice
{
// static final long mod=7420738134811L;
static int mod=998244353;
static final int size=501;
static FastReader sc=new FastReader(System.in);
// static Reader sc=new Reader();
static PrintWriter out=new PrintWriter(System.out);
static lon... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 0560b153a9bbdd8027a0a0ef5502ac15 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class Practice
{
// static final long mod=7420738134811L;
static int mod=1000000007;
static final int size=20001;
static FastReader sc=new FastReader(System.in);
// static Reader sc=new Reader();
static PrintWriter out=new PrintWriter(System.out);
static ... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9eb80383e788a4f47f3aefdbf62d9a70 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner scn = new Scanner(System.in);
int t = scn.nextInt()... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | c32c1c4e75fc0763eb709f01c4eda9ed | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.Scanner;
public class hi {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while (t-- > 0) {
long n = sc.nextLong();
long k = sc.nextLong();
long gio = 0;
long may = 1;
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9a5bec8d8cc1ccc099ad8690a8254c6f | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
import java.math.*;
import java.text.DecimalFormat;
public class Main {
private static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() throws FileNotFoundException {
if (System.getProperty("os.name").equals(... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 233f7966b5c2868a75df105e0ee30898 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.util.*;
import java.io.*;
public class Main {
static FastScanner sc = new FastScanner(System.in);
static PrintWriter pw = new PrintWriter(System.out);
static StringBuilder sb = new StringBuilder();
static long mod = (long) 1e9 + 7;
public static void main(String[] args) throws... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 660eaa8cfb9ce1ac2ddbd21e2cc6aa55 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.io.*;
import java.math.*;
import java.util.*;
public class B_Update_Files
{
public static void main(String[] args)throws Exception
{
new Solver().solve();
}
}
//* Success is not final, failure is not fatal: it is the courage to continue that counts.
class Solver... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 862b46e1219c6035e94ff5b421300253 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.TreeSet;
// public class Solution{
class Solution{
public static void main(String[] args){
FS sc = ne... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 7d73b07e27e7a46c9623683d1a29d22a | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //package MyPackage;
import java.util.*;
import java.io.*;
public class codec{
static class Pair implements Comparable<Pair>
{
int wt;
int idx;
int x;
Pair(int wt, int idx, int x)
{
this.wt = wt;
this.idx = idx;
this.x = x;
}
public int compareTo(Pair o)
{
return this.... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 5dec8bb9295c6e63f6cf6b0ab2fc84a1 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | /**
* B_Update_Files
*/
import java.util.*;
import java.io.*;
public class B_Update_Files {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(
new InputStreamReader(Syste... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 8726df625e5d645fb9b4f12dc41ac192 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | import java.io.*;
import java.util.*;
public class ComdeFormces {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
FastReader sc=new FastReader();
BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
int t=sc.nextInt();
... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 9630ee7649fc695547ce5dccc91c9c4d | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes |
import java.util.*;
import java.math.*;
//import java.io.*;
public class Experiment {
static Scanner in=new Scanner(System.in);
// static BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
static class Pair implements Comparable<Pair>{
int first;
in... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output | |
PASSED | 6992bf94dac644e2c50bba8b95aba086 | train_108.jsonl | 1635518100 | Berland State University has received a new update for the operating system. Initially it is installed only on the $$$1$$$-st computer.Update files should be copied to all $$$n$$$ computers. The computers are not connected to the internet, so the only way to transfer update files from one computer to another is to copy... | 256 megabytes | //package Codeforces.PractiseR1100;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
public class UpdateFiles {
public static void main(String[] args) throws Exception {new UpdateF... | Java | ["4\n8 3\n6 6\n7 1\n1 1"] | 2 seconds | ["4\n3\n6\n0"] | NoteLet's consider the test cases of the example: $$$n=8$$$, $$$k=3$$$: during the first hour, we copy the update files from the computer $$$1$$$ to the computer $$$2$$$; during the second hour, we copy the update files from the computer $$$1$$$ to the computer $$$3$$$, and from the computer $$$2$$$ to the computer... | Java 11 | standard input | [
"greedy",
"implementation",
"math"
] | 5df6eb50ead22b498bea69bb84341c06 | The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^5$$$) — the number of test cases. Each test case consists of a single line that contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le k \le n \le 10^{18}$$$) — the number of computers and the number of patch cables. | 1,100 | For each test case print one integer — the minimum number of hours required to copy the update files to all $$$n$$$ computers. | standard output |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.