Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
2021 was approaching and the world was about to end. So 2 gods Saurabhx and Saurabhy (from Celesta) created the Cyberverse. But this time disappointed with humans both the gods decided not to have humans in this world. So they created a world of cyborgs. A world without humans. Isn’t it interesting? So let us dive into the cyberverse and have a look at their problems.
There are N kid cyborgs with Chief Cyborg ‘100gods’ and he has K weapons with him. He wants to distribute those K weapons among N kid cyborgs. Since all the kid cyborgs are very good friends, so they set a rule among themselves for taking those weapons. The rule states that the difference between kid cyborg having the maximum weapons and the kid cyborg having minimum weapons should be less than or equal to 1.
Find the value of the minimum number of weapons a kid cyborg can have when all the K weapons are distributed among them.
Input:
1
5 8
Output:
1
/* 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. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int n=sc.nextInt();
int k=sc.nextInt();
if(k>=n){
System.out.println(k/n);
}else{
System.out.println(0);
}
}
}
}
#include <iostream>
using namespace std;
int main() {
int t,n,k;
cin>>t;
while(t--)
{
cin>>n>>k;
int rem=k/n;
cout<<rem<<endl;
// if(rem==0)
// cout<<1<<endl;
// else
// cout<<rem<<endl;
}
return 0;
}
# cook your dish here
for i in range(int(input())):
a,b=map(int,input().split())
print(b//a)
In our experience, we suggest you solve this The Begining Era Of Cyberverse CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the The Begining Era Of Cyberverse CodeChef Solution
I hope this The Begining Era Of Cyberverse CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>