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 | 5f821ac7e2e007eaae833d7062875795 | 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 code{
static class Reader
{
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader()
{
din = 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 8 | 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 | c858b4718a1ee2069824dd2c89839c73 | 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 test {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while (t-- > 0) {
long n = in.nextLong() -1;
long m = in.nextLong();
long c = 0;
long 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 8 | 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 | 1b4bd9fab30c2af3a29c7e1cfc92698d | 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.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class codeforcesB{
public static class FastReader
{
BufferedReader br;
StringTokenizer st;
... | 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 8 | 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 | d11af70565cb66ed4ee01a7d004e4c96 | 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 B {
public static void main(String[] args) throws IOException {
Reader sc = new Reader();
PrintWriter out = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-- > 0) {
long n = 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 8 | 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 | a956183341327c1f9891e3d78c777aff | 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 {
class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
try {
br = new BufferedReader(
new FileReader("input.txt"));
Print... | 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 8 | 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 | 64755f892efc234f5068487b5ddb30f2 | 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 CFsolve {
public static void main(String[] args) {
FastScanner input = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int t = input.nextInt();
while(t-- > 0) {
long n = input.nextLong()-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 8 | 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 | 6d186309d793ca74970717b7dfee225d | 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.*;
import java.net.Inet4Address;
import java.util.*;
public class sampleEditor_codeforces {
static int mod=1000000007;
static int mod2=1000003;
static Scanner sc = new Scanner(System.in);
static class Pair implements Comparable<Pair>{
int x;
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 8 | 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 | e3d03884f739cb40aa50462349d2cdf9 | 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.util.stream.Collectors;
import java.io.*;
import java.math.*;
public class ER116_B {
public static FastScanner sc;
public static int MOD= 1000000007;
public static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTok... | 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 8 | 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 | 470ba7e81d601f6655b011f5da1f44e2 | 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;
import java.util.Arrays;
import java.lang.Math;
public class UpdateFiles
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
String str = sc.nextLine();
while(t-->0)
{
long n = sc.nextLong(), k = sc.nextLong();
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 8 | 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 | f028066e576d69737e8f6a4fe01f959a | 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 Main {
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;
}
static long ceil(double x)
{
long y=(long)x;
if(x-y>0)
{
y++;
}
return y;
}
public static voi... | 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 8 | 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 | 05c610a706732f069b91246a18e741e9 | 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 contests.div2.edu116;
import java.io.*;
import java.util.StringTokenizer;
public class B {
static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
static int fasterScanner() {
try {
boolean in = false;
int res = 0;
for (; ; ) {
... | 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 8 | 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 | 713885229bacb817a3399c7b21b9eed8 | 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 Coder {
static StringBuffer str=new StringBuffer();
static long n,k;
static void solve(){
long num=1;
long cnt=0;
while(num<=k && num < n){
num *= 2; cnt++;
}
if(num<n) cnt += (n-num+k-1)/k;
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 8 | 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 | 6f37ab5fe16e40b2653b3bd430b1024a | 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.Arrays;
import java.util.Scanner;
public class Div2_Round_116_No9 {
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();
if(n==1)
System.out.pr... | 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 8 | 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 | eaa3d602643adb3a1275418c19d9c18c | 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
{
public static void main (String[] args) throws java.lang.Exception
{
//your code goes here
Sc... | 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 8 | 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 | 7010b4c79329b9d072d16161a05a655b | 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 Codechef {
public static void main(String[] args) throws java.lang.Exception {
FastReader in = new FastReader(System.in);
StringBuilder sb = new StringBuilder();
int t = 1;
t = in.nextInt();
while (t > 0) {
--t;
long 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 8 | 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 | 28b1fb8faa60d1c3d600c2fa16b356b0 | 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 ferrisWheel {
static PrintWriter pw = new PrintWriter(System.out);
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) throws IOException, InterruptedException {
int t=sc.nextInt();
while(t-->0) {
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 8 | 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 | 24fe589a1c949c828f2a230eb9d0d66d | 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 Linked_List_implement {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int t = scan.nextInt();
while(t-- != 0 ) {
long n = scan.nextLong();
long k = scan.nextLong();
long kk = 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 8 | 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 | 117c5cdbfe8855b10edc2e045452b02a | 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
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0)
{
long cnt = 0;
long n = sc.nextLong(), k = sc.nextLong();
if(n==1 && k==1)
{
System.out.println(0);
}
else 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 8 | 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 | 6a18f00553202ebdf35772771b7be99b | 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.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.sql.Time;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util... | 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 8 | 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 | 79e9481cfc75d68ddca97bd2563037b5 | 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.PrintWriter;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int tc = sc.nextInt();
while(tc-->0){
long n = sc.nextLong() - 1, 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 8 | 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 | 6ac2df899e17a9a5839b9a6ee0b5a139 | 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 b {
public static void main(String[] args){
FastScanner sc = new FastScanner();
int t = sc.nextInt();
while(t-- > 0){
long n = sc.nextLong();
long k = sc.nextLong();
long ans = 1;
long st... | 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 8 | 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 | 7d8946f0524f828946a78013994a1062 | 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;
/**
* Accomplished using the EduTools plugin by JetBrains https://plugins.jetbrains.com/plugin/10081-edutools
* <p>
* To modify the template, go to Preferences -> Editor -> File and Code Templates -> Other
*/
public class Main {
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 8 | 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 | 999039ff364c729db25eef85fa248e43 | 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 {
static int arr[];
static BufferedWriter log = new BufferedWriter(new OutputStreamWriter(System.out));
static FastReader input = new FastReader();
//static Scanner input = new Scanner(System.in);
public static void main(String[] arg... | 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 8 | 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 | fa6bd2ec46dfdc63dc65f5af83f1c3b4 | 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 B1 {
public static void main(String args[]){
FScanner in = new FScanner();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
m: while(t-->0) {
long n=in.nextLong(),k=in.nextLong(),time=0;
if(n==1)
{
out.println(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 8 | 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 | 29e8bf2aef894f9d353af7e6ba3bb520 | 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 B1 {
public static void main(String args[]){
FScanner in = new FScanner();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
m: while(t-->0) {
long n=in.nextLong(),k=in.nextLong(),time=0;
if(n==1)
{
out.println(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 8 | 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 | c7d3fd26a4fa95a7093c3f0d102b8beb | 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 B1 {
public static void main(String args[]){
FScanner in = new FScanner();
PrintWriter out = new PrintWriter(System.out);
int t = in.nextInt();
m: while(t-->0) {
long n=in.nextLong(),k=in.nextLong(),time=0;
if(n==1)
{
out.println(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 8 | 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 | 9e24e42afadf17d9b139ade598b48789 | 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.math.*;
import java.util.*;
public class Main {
static int i, j, k, n, m, t, y, x, sum = 0;
static long mod = 998244353;
static FastScanner fs = new FastScanner(... | 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 8 | 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 | 00a411bcc35f227ab745f8afa84fcdca | 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.io.PrintWriter;
import java.io.StreamTokenizer;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import j... | 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 8 | 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 | d0634b5dd3764f2ec0403c7cfea5bbc2 | 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;
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) {
BigInteger n = sc.nextB... | 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 8 | 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 | c8097095a1866e622d0508099a8e1d3f | 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 MyClass {
public static void main(String[] args) {
Scanner sc= new Scanner (System.in);
long t=sc.nextInt();
while (t-->0){
long c=sc.nextLong();
long k=sc.nextLong();
long count=0;
long x=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 8 | 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 | 8924f841edf541f79e569d7fd5f675bb | 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 PracticeProblems {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
PrintWriter out = new P... | 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 8 | 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 | 407e282628f9c8433a2b7a0e9f2f7a0a | 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 UpdateFiles {
public static PrintWriter out;
public static void main(String[] args)throws IOException{
Scanner sc=new Scanner();
out=new PrintWriter(System.out);
int t=sc.nextInt();
while(t-->0) {
long n=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 8 | 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 | 168aceedfbd44e9b8b80fcc71b255a1d | 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 UpdateFiles {
public static PrintWriter out;
public static void main(String[] args)throws IOException{
Scanner sc=new Scanner();
out=new PrintWriter(System.out);
int t=sc.nextInt();
while(t-->0) {
long n=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 8 | 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 | fbc61521343f57ad0bb387d6f76b78c2 | 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 {
public static class Pair implements Comparable < Pair > {
int d;
int i;
Pair(int d, int i) {
this.d = d;
this.i = i;
}
public int compareTo(Pair o) {
return this.d - o.d;
... | 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 8 | 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 | f130e3011cfd1d42e1b9589707f88afc | 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 UpdateFiles {
public static void main(String[] args) throws IOException{
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int t = sc.nextInt();
while(t-->0){
long n = 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 8 | 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 | 41b370f8442851c8022799feb5774b81 | 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 Dec10B {
static boolean[] isPrime;
public static void main(String[] args) {
FastScanner sc=new FastScanner();
PrintWriter pw=new PrintWriter(System.out);
int ts=sc.nextInt();
while(ts-- > 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 8 | 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 | 7d2e90f6366062be8dd18de1d3f4e608 | 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 Dec10B {
static boolean[] isPrime;
public static void main(String[] args) {
FastScanner sc=new FastScanner();
PrintWriter pw=new PrintWriter(System.out);
int ts=sc.nextInt();
while(ts-- > 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 8 | 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 | af68ede02e9c31c0d8281242100810b4 | 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 cf {
public static void main(String[] args){
FastScanner sc = new FastScanner();
int t = sc.nextInt();
while(t-- > 0){
long n = sc.nextLong();
long k = sc.nextLong();
long hour = 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 8 | 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 | 4b5ca3c17efc9152db5eba4c4194a1ed | 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 cf {
public static void main(String[] args){
FastScanner sc = new FastScanner();
int t = sc.nextInt();
while(t-- > 0){
long n = sc.nextLong();
long k = sc.nextLong();
long hour = 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 8 | 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 | 3f0c58941c313e22f915aa855af76bf4 | 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.ArrayList;
import java.util.StringTokenizer;
public class UpdateComputers {
static int mod = 1000000007;
public static void main(String[] args) throws IOException {
FastReader reader = new FastReader();
FastWriter writer = new FastWriter();
... | 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 8 | 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 | 04007b2b96690007a0bef4464dd41837 | 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 Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt() ;
while (n -- != 0){
long sum = sc.nextLong() ;
long line = sc.nextLong() ;
long ans = 0 ;
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 8 | 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 | b8d8b59eceac6e13c5a2ff036d064fee | 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.lang.*;
// import java.math.*;
public class Codeforces {
static FastReader sc=new FastReader();
static PrintWriter out=new PrintWriter(System.out);
static long mod=1000000007;
// static long mod=998244353;
static int MAX=Integer.MAX_VALUE;
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 8 | 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 | 9e31b995f8044358620853706c314757 | 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 Solution {
public static void main(String[] args) throws IOException
{
FastScanner f= new FastScanner();
int ttt=1;
ttt=f.nextInt();
PrintWriter out=new PrintWriter(System.out);
outer: for(int tt=0;tt<ttt;tt++) {
long n=f.nextLong();
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 8 | 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 | add97eba93d94eddb13a333d662fb996 | 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 i;
long n,k;
long h;
long c;
int t = sc.nextInt();
for(i = 0; i <t;i++){
n= sc.nextLong();
k= 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 8 | 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 | 786b9518762002ddb44721f60dee3bea | 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 MyAnswer {
static class FastScanner{ //10^5 -- .15 sec && 4*10^6 ---> .86 sec
BufferedReader br;
StringTokenizer st;
public FastScanner(){
br = new BufferedReader(new InputStrea... | 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 8 | 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 | 26e3a88ae5831176da83f86f12eb43de | 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 {
public static void main(String[] args) throws IOException {
FastScanner fs=new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int T = fs.nextInt();
for (int tt=0; tt<T; tt++) {
... | 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 8 | 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 | d763e6e7e4c610a460eae740110450c0 | 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 scanner = new Scanner(System.in);
int tc = Integer.parseInt(scanner.next());
while(tc-- > 0) {
long n = Long.parseLong(scanner.next());
long k = Long.parseLong(scanner.next());
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 8 | 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 | ad2622b8f4f2d80829123a5176a51fde | 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.*;
import java.util.* ;
import java.io.* ;
@SuppressWarnings("unused")
/*
*
* SEND HELP
*
*/
//Scanner s = new Scanner(new File("input.txt"));
//s.close();
//PrintWriter writer = new PrintWriter("output.txt");
//writer.close();
public class cf
{
static final int mod = (int)1e9+7 ... | 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 8 | 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 | 7ddb75bdd7edb625823294840b88a7db | 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.math.*;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.... | 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 8 | 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 | 547f5b8041554e15e8c36f717f3edd2a | 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 a=sc.nextInt();
while (a-->0)
{
long n=sc.nextLong();
long k=sc.nextLong();
if(n==1)
{
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 8 | 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 | 862cb8c0d43ede962a6a3eb9c6515efa | 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.*;
public class cf2{
public static void main (String [] args){
Scanner sc = new Scanner (System.in);
int t = sc.nextInt();
sc.nextLine();
while(t-->0){
String s= sc.next();
String s2 = 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 8 | 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 | 41d26172a8c6fb6d8a61d8d0e257bf05 | 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 javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar;
import java.lang.*;
import java.io.*;
public class Main
{
public static class FastReader {
BufferedReader b;
StringTokenizer s;
public FastReader() {
b=new BufferedReader(new InputStreamReader(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 8 | 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 | 01a7ae40979d8b42196aa5d1ed981e6d | 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.StringTokenizer;
//start of Scanner class
public class msa {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw = new PrintWriter(System.out);
static StringTokenizer st;
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 8 | 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 | 1a5a3a4a86a27562ffd8e31c49099bcf | 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 P2 {
public static void main(String[] args) {
FastIO io = new FastIO();
int t = io.nextInt();
while (t --> 0) {
long n = io.nextLong(), k = io.nextLong();
long activated = 1, answer = 0;
while (activated<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 8 | 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 | fff473e10cc313dc0fc9beae3d7167b7 | 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 C {
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();
if(k==1) {
System.out.println((long)n-1);
}else {
... | 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 8 | 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 | b43b94e8d13397e8a6fc61f598de777f | 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 Main {
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();
n=n-1;
long sum=0,ans=0,p=1;
while(p< k && sum+p < 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 8 | 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 | 322e6f4075c6d7662d24d4f22e98e796 | 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_Update_Files{
public static void main(String[] arge){
Scanner sc= new Scanner(System.in);
int t= sc.nextInt();
while(t-->0){
long c= sc.nextLong();
long p=sc.nextLong();
if(c==1){
System.out.println(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 8 | 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 | d29403033c0b10967cd86ced8e236c82 | 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 {
public static void main(String[] args) throws IOException {
//br = new BufferedReader(new FileReader("input.txt"));
//out = new PrintWriter("output.txt");
int t = 1;
t = 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 8 | 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 | da46b600ba0ac1a79cfe9ebb928901ad | 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 {
FastScanner scan = new FastScanner();
PrintWriter output = new PrintWriter(System.out);
int t = scan.nextInt();
for(int tt = 0;tt<t;tt++) {
long n = scan.nextLong(), k = scan.nextL... | 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 8 | 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 | d8e57ca00a90c3ad7add6d77e4c9960b | 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 javafx.util.*;
public class Main
{
static FastReader in = new FastReader();
public static void main(String args[])throws IOException
{
/*
* star,rope,TPST
* BS,LST,MS,MQ
*/
int t = i();
while(t-- > 0){
long n = in.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 8 | 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 | 9bce38a3c20468d5f1cef5c9ae655a3a | 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 UpdateFiles{
static long mod = 1000000007L;
static MyScanner sc = new MyScanner();
static void solve(){
long n = sc.nextLong();
long k = sc.nextLong();
if(n==1){
out.println(0);
return;
}
... | 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 8 | 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 | 74aebf36ed4579d365cc649f326b0dd3 | 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.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java... | 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 8 | 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 | ead7d1322b15aec2beedf2454a897d2d | 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 | /**
* @Jai_Bajrang_Bali
* @Har_Har_Mahadev
*/
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;
public class practice2 {
static long mod = (int) 1e9 + 7;
static long gcd(long a, long b) {
if (b > a) {
return gcd(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 8 | 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 | e09fdab79d0b375d8e1fdc570e57a778 | 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.*;
import java.util.*;
import java.io.*;
public class B_Update_Files {
public static void main(String[] arg){
Scanner s=new Scanner(System.in);
try {
int t=s.nextInt();
while(t-->0){
long n=s.nextLong();
long k=s.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 8 | 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 | 553a16218a09eef6c48eb52c3314c0c2 | 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 MyClass {
public static void main(String[] args) {
Scanner sc= new Scanner (System.in);
long t=sc.nextInt();
while (t-->0){
long c=sc.nextLong();
long k=sc.nextLong();
long count=0;
long x=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 8 | 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 | 072372dae0b74ecf77e014785cfbd899 | 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 Solution {
public static void main(String[] args) throws Exception {
int tc = io.nextInt();
for (int i = 0; i < tc; i++) {
solve();
}
io.close();
}
private static void solve() throws Exception {
... | Java | ["4\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 8 | 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 | b57fc41c83e81de4953a88e658819d18 | 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 codeforces1606B {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int numCases = Integer.parseInt(br.readLine());
for (int rep=1;rep<=numCases;rep++)... | 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 8 | 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 | e9ae14b9b4d038d8e98b9e24ecd7991b | 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.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for(int i=0;i<t;i++) {
long n = sc.nextLong();
long k = sc.nextLong();
l... | 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 8 | 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 | e2fe37ac8268c6154f1eccc6bd184975 | 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.BigInteger;
import java.text.DecimalFormat;
import java.util.*;
public class Codeforces {
static String ab,b;
static class Node
{
int val;
Node left;
Node right;
public Node(int x) {
// TODO Auto-g... | 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 8 | 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 | 10ad62f8f401ea0bf93f0523a02b9efa | 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 Contest_yandexA{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int t = input.nextInt();
for(int tt = 0;tt<t;tt++){
long n = input.nextLong();
long k = input.nextLong();
long m = 1;
long time = 0;
while(k > m){
m*=... | 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 8 | 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 | d077a6ff58715e310b7e6b9e2a549945 | 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 CF3 {
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new
InputStreamReader(System.in));
}
String nex... | 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 8 | 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 | 2f503138b1dbce59795db522ea58c2fc | 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 Div2.B;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class UpdateFiles {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int t = Integer.parseInt(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 8 | 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 | 8c79585089266bfc3965e5b8eb94611e | 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.*;
/**
* @author Naitik
*
*/
public class Main
{
static FastReader sc=new FastReader();
static int dp[][][];
//static int v[][];
static int mod=998244353;;
// static int mod=1000000007;
static long max;
static long bit[];
... | 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 8 | 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 | 24c5d893733592a9aec83fb49ddc63eb | 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;
public class FirstProblem {
public static void main(String[] args) {
FastReader in =new FastReader();
int test = in.nextInt();
for(int i = 0; i<test; i++) {
long n, k;
n = in.nextLong(); k = i... | 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 8 | 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 | b1168d824d9c263865b98f774d06afdd | 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.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import static java.lang.System.out;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.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 8 | 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 | 0e879e0ca983e2df1c843da06c82f99b | 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.Container;
import java.awt.image.SampleModel;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import javax.naming.... | 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 8 | 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 | ac9113731b5446a8d25cacb7e0d79191 | 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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.concurrent.LinkedBlockingDeque;
import java.io.PrintStream;
import java.io.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 8 | 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 | 33b5dbe2da2dd6546988fea11a935db3 | 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 Main {
public static void main(String args[]) {
Scanner Sc=new Scanner(System.in);
int T=Sc.nextInt();
for(int i=0;i<T;i++)
{
long n=Sc.nextLong();
long k=Sc.nextLong();
n--;
long c=0;int flag=... | 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 8 | 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 | 5fcd558bbbafcf68f53090a3c2beb45d | 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.Scanner;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class cfContest1606 {
public static void main(String args[]) throws IOException {
Reader scan = new Reader();
int t = scan.nex... | 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 8 | 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 | d072dc65128f87ad7fe835c1dba9899d | 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.InputStream;
import java.io.PrintWriter; // System.out is a PrintStream
import java.util.InputMismatchException;
public class B {
private static int MOD = (int)1e9 + 7, mod = 99_82_44_353;
private static double PI = 3.14159265358979323846;
public static void mai... | 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 8 | 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 | 2d69b8ea4311c9393871df688e7953b9 | 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 test {
private static long solve(long n, long m) {
long hrs = 0;
long count = 1;
while (count < n && count <= m) {
count *= 2;
hrs++;
}
if (count >= n) {
return hrs;
}
... | 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 17 | 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 | 4d5e966a91b9d487c135ce2cea7757ae | 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 test {
private static long solve(long n, long m) {
long hrs = 0;
long count = 1;
while (count < n && count <= m) {
count *= 2;
hrs++;
}
if (count >= n) {
return hrs;
}
... | 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 17 | 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 | 9a1665bb43c9771db3b6003db17a3e76 | 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.*;;
public class test {
private static long solve(long n, long m) throws IOException {
long hrs = 0;
long count = 1;
while (count < n && count <= m) {
count *= 2;
hrs++;
}
if (count >= n) {
return hrs;
... | 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 17 | 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 | 0c665888a3aec102ce9e201414574232 | 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 | // Question -> https://codeforces.com/problemset/problem/1606/B
import java.io.*;
// import java.util.*;
public class LiveQes3 {
public static void solve() throws IOException {
long computers = in.nextLong();
long cables = in.nextLong();
long ans = 0;
long nthTermOfGP... | 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 17 | 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 | b0fb2295089f2eeebf51dc772800fb43 | 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,m... | 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 17 | 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 | 24638be98b9a57bb19d9b82e9d7e8547 | 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 A1{
static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static final long mod=1000000007;
... | 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 17 | 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 | e4189cdf4d2bcd6d3e2cbac40bf60d7e | 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 Brocoders{
static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
static StringTokenizer st;
static final long mod=100000... | 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 17 | 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 | 95283658eb42c9ae2b4c12a3534341c4 | 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 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int test = sc.nextInt();
for(int t = 0; t<test; ++t){
long n = sc.nextLong();
long k = sc.nextLong();
long ans = 0;
long pc =... | 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 17 | 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 | 39a98c6caae7ef7f6f7bf894d3d47afa | 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.adhok;
import java.util.*;
public class Main {
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 17 | 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 | 1f58db8810a6a0399edcf04bd5e8f407 | 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.util.function.*;
import java.io.*;
// you can compare with output.txt and expected out
public class RoundEdu116B {
MyPrintWriter out;
MyScanner in;
// final static long FIXED_RANDOM;
// static {
// FIXED_RANDOM = System.currentTimeMillis();
// }
final static String I... | 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 17 | 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 | 9e86938cfb7b400cf9124e760b01e1e2 | 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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamW... | 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 | 0355456c66a464b2b6801ec2e9b48a5f | 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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamW... | 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 | 92af213f016b3faa84ad343e0be75a11 | 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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamW... | 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 | aacd37506422b7b3c22794e0c4dc3425 | 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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.OutputStreamW... | 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 | 8c9e74277324bc4d6bd31793d9a19e7b | 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 Program {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
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 | 8e82461514e3ec17214d26b68284d784 | 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 Program {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
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 | 22a7c8cbdb5c1247d032efea05b1a0dc | 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 Program {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
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 | 43ca45ca843f17c1506f344f626925c9 | 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 Program {
public static void main(String[] args) {
Scanner sc = new Scanner(new BufferedInputStream(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
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 | b2af861aade2804d104872e2e754160b | 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 Program {
public static void main(String[] args) {
try (
Scanner sc = new Scanner(new BufferedInputStream(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
... | 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 | 1e4251435f871168a016b24908949796 | 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 AMain {
public static void main(String[] args) {
try (Scanner in = new Scanner(new BufferedInputStream(System.in));
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));) {
int t = in.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.