*Well Explained JAVA Code* import java.util.Scanner; public class Vehicles { public static void main(String[] args) { // Creating Scanner object for taking input from user. Scanner sc = new Scanner(System.in); // Input no. of vehicles int v = sc.nextInt(); // Input no. of wheels int w = sc.nextInt(); // Checking given constraints if(v>w || w%2!=0 || w < 2) System.out.println("INVALID INPUT"); int tw = ((v*4)-w)/2; // v*4 gives us the no. of wheels reqd to create v no. of 4 wheelers. // (v*4)-w gives us the no. of wheels that we are short of. // Finally we use these remaining wheels to create Two Wheelers so ,((v*4)-w)/2.
import numpy as np # Coefficients of the equations A = np.array([[1, 1], [2, 4]]) B = np.array([200, 540]) # Solving the system of equations solution = np.linalg.solve(A, B) # Extracting the number of two-wheelers and four-wheelers two_wheelers = int(solution[0]) four_wheelers = int(solution[1]) print(f"Two wheelers = {two_wheelers}") print(f"Four wheelers = {four_wheelers}")
Sorting the array is not necessary in this case because the problem asks for the minimum number of houses required in the order they are given to provide enough food for the rats. The idea is to accumulate food house by house and stop as soon as you reach or exceed the required amount. This approach respects the original order of the houses, which is important because the question implies sequential distribution rather than an optimal selection from unordered data.
V = int(input("Enter the total number of vehicles: ")) W = int(input("Enter total wheels: ")) if V >= W or W < 2 or W % 2 != 0: print("INVALID INPUT") TW = (4*V - W) // 2 FW = V - TW print("TW =",TW) print("FW =",FW)
let x denote 2 wheelers and y denote 4 wheelers vehicles x+y=v 2x+4y=w y=v-x 2x+4(v-x)=w 4v-w=2x x=(4v-w)/2 y=v-x=v-(4v-w)/2=(w-2v)/2 Now once we get v and w inputs , we can easily calculate x and y using above problems in program.
13:04 v = int(input("Enter the total number of vehicles: ")) w = int(input("enter total wheels: ")) tw=(4*v-w)//2 fw=v-tw print(tw) print(fw) ''' Time Complexity: O(1) Space Complexity: O(1) "'
Hello sir @PrepInsta this question is saying to minimum number of house to feed all the rats so the ans should be 2 (8,7) because in this, there is no any classification that the no. of house should be in a sequence. or ager sequence me bhi rakhna hota to bhi and 3 hi data (8,3,5) then why 4?
In Accenture coding round which type of editor we get, like leetcode wherevjust have to complete the function or codechef like we have to write code from scratch?
In 1st qn since it was asked minimum number of houses then why in the example we took 4 houses, houses with food 8 and 7 will also make 8+7 > 14 and num of houses will be 2?
def calculation(V, W): if (W < 2 or W % 2 != 0 or V > W): print("Invalid inputs") else: Y = (W - 2 * V) / 2 X = V - Y print(X, Y) calculation(200, 540)
Java program to calculate vehicle manufacture : import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner x = new Scanner(System.in); System.out.print("enter total number of vehicles : "); int v = x.nextInt(); System.out.print("enter total number of wheels : "); int w = x.nextInt(); if(2 0) { System.out.println("total four wheeler needed : "+fw); System.out.println("total two wheeler needed : "+tw); } else { System.out.println("INVALID INPUT"); } } }
this question demand the min no of house then why its output is 4. the correct ans would be 8,3,5 (3)....using greeedy or dp something...how you can solve this by starting at index 0.??can someone please correct me if im wrong with it ...
To solve the problem of finding the number of two-wheelers and four-wheelers given the total number of vehicles and wheels, you can use a system of linear equations. Let's denote: x as the number of two-wheelers (each having 2 wheels). y as the number of four-wheelers (each having 4 wheels). Given: v as the total number of vehicles. w as the total number of wheels. The equations are: 𝑥 + 𝑦 = 𝑣 x+y=v (Total number of vehicles) 2 𝑥 + 4 𝑦 = 𝑤 2x+4y=w (Total number of wheels) From equation 1, you can express y as: 𝑦 = 𝑣 − 𝑥 y=v−x Substitute this into equation 2: 2 𝑥 + 4 ( 𝑣 − 𝑥 ) = 𝑤 2x+4(v−x)=w This simplifies to: 2 𝑥 + 4 𝑣 − 4 𝑥 = 𝑤 2x+4v−4x=w 2 𝑣 − 2 𝑥 = 𝑤 − 4 𝑣 2v−2x=w−4v 𝑥 = 4 𝑣 − 𝑤 2 x= 2 4v−w After calculating x, you can find y using: 𝑦 = 𝑣 − 𝑥 y=v−x
Total Wheels = 540 Total Vehicle = 200 (2 wheels + 4 wheels ) so x+y = 200 ----- total vehicle 2x + 4y = 540 -------- total Wheels from equation y = 200-x ------(put in equation ) 2x + 4*(200-x) = 540 2x + 800 - 4x = 540 800 - 2x = 540 -2x = -260 x = 130 --------(put in equation 1); 130 + y = 200 y = 70; so x =130 y = 70 now you get the solution code : public class sol{ main{ findNoOfVehical(200,540) } public static void findNoOfVehical(int v , int w){ int x; // 2 wheeler int y; // 4 wheeler x = (4 * totalVehicles - totalWheels) / 2; y = 200 - x sout(x); sout(y) } }
Java Code import java.util.Scanner; public class TwoWhellerFourWhellerProduction { public static void isValidProduction(){ Scanner s = new Scanner(System.in); System.out.print("Accept value of V."); int V = s.nextInt(); System.out.print("Accept value of W."); int W = s.nextInt(); if(W % 2 != 0 || V>W || 2>W){ System.out.println("INVALID INPUT"); } int TW, FW; TW = (4*V - W)/2; FW = V-TW; System.out.println("TW:"+TW+ " and FW:"+FW); } public static void main(String[] args) { isValidProduction(); } }
V = int(input("Number of vehicles: ")) W = int(input("Total number of wheels: ")) if V >= W or W < 2 or W % 2 == 1: print("INVALID INPUT") else: TW = 2*V - W // 2 FW = V - TW print("TW =",TW) print("FW =",FW)
import java.util.*; public class MyClass { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a= sc.nextInt(); int b= sc.nextInt(); int c=0; if(c c){ System.out.println("INVALID INPUT"); } else { c = (4*b -c)/2; System.out.println("two wheeler =" + c +" four wheeler = "+ (b-c) ); } } } Time complexity is O(1) for calculating number of tyres
#include #include int main() { int i, vehicle, wheel, twCount=0, fwCount=0; printf("Enter vehicle that should be manufactured : "); scanf("%d",&vehicle); printf(" Enter wheel number : "); scanf("%d",&wheel); if(wheel>2 && wheel%2==0 && vehicle*2
class No_of_Vehicles { public static void main(String[] args) { int v=200; int w=540; no_of_vehicles(v,w); } public static void no_of_vehicles(int v,int w){ int two_wheel,four_wheel; four_wheel=(w-2*v)/2; two_wheel=v-four_wheel; System.out.println("Number of 2 wheel vehicles:"+two_wheel); System.out.println("Number of 4 wheel vehicles:"+four_wheel); } }
rat=int(input()) unit=int(input()) n=int(input()) a=[] sum=0 for i in range(n): a.append(int(input())) rqfood=rat*unit for j,m in enumerate(a,1): sum+=m if sum>rqfood: print(j) break
public class No_of_vehiciles { public static void main(String[] args) { Scanner obj = new Scanner(System.in); numOfVh(obj.nextInt(),obj.nextInt()); } public static void numOfVh(int v, int w){ int x=0; // two wheelers int y =0; // four wheelers int r = w-(2*v); y=r/2; x=v-y; System.out.println("Number of Two wheelers is " + x); System.out.println("Number of four wheelers is " + y); } }
Sir can I solve Accenture coding assessment exam in javascript..... ?because in their company page they only mentioned c,c++,java, python languages....
class HelloWorld { public static void main(String[] args) { int w=540; int TW,FW; int n=200; TW=((4*n)-w)/2; FW=n-TW; System.out.println(TW); System.out.println(FW);
V = int(input().strip()) W = int(input().strip()) if W < 2 or W % 2 != 0 or V >= W: print("INVALID INPUT") else: TW = 2 * V - (W // 2) FW = V - TW if TW < 0 or FW < 0: print("INVALID INPUT") else: print(f"TW={TW}") print(f"FW={FW}")
Hi bro, i have one doubt that my graduation aggregate is 60% exactly, can i able to attend this role or not , please reply me if anyone knows about this, please ! recently i got a mail from accenture regarding to the upcoming assessments, so if anyone knows about cutoff of a percentage please reply me !
v=int(input()) w=int(input()) x=0 y=0 if w>=2 and w%2==0 and w>v: y = int((w-2*v)/2) x = int(v-y) print("Two wheelers:"+str(x)) print("Four wheelers:"+str(y))
import java.util.*; public class Main { public static void main(String[] args) { System.out.println("Hello World"); Scanner sc=new Scanner(System.in); int v=sc.nextInt(); int w=sc.nextInt(); int z=w/2; int cars=z-v; int bikes=v-cars; System.out.println(bikes+" "+cars); } }
in java import java.util.*; public class sai { public static void main(String[] args) { Scanner s = new Scanner(System.in); int v =s.nextInt(); int w =s.nextInt(); int x=0,y=0; for(int i=1;i
let noOfTwoWheeler= ((v*4)-w)/2; let noOfFourWheeler=v-noOfTwoWheeler;/// Other way let noOfFourWheeler= (w-(v*2))/2; let noOfTwoWheeler=v-noOfFourWheeler;///
v=int(input("enter vechiles number")) w=int(input("enteer the wheels no")) for i in range(0,200): for j in range(0,200): if(i+j==v): two=i four=j if(i*2+j*4==w): print("2wheell 4wheeler",i,j) break
import java.util.Scanner; public class VehicleProduction { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the total number of vehicles (V): "); int V = scanner.nextInt(); System.out.print("Enter the total number of wheels (W): "); int W = scanner.nextInt(); if (W >= 2 * V && W % 2 == 0 && V < W) { int FW = (W - 2 * V) / 2; int TW = V - FW; System.out.println("Number of two-wheelers (TW): " + TW); System.out.println("Number of four-wheelers (FW): " + FW); } else { System.out.println("INVALID INPUT"); } scanner.close(); } }
everyone who is confident to crack Accenture placement like this ❤
*Well Explained JAVA Code*
import java.util.Scanner;
public class Vehicles {
public static void main(String[] args) {
// Creating Scanner object for taking input from user.
Scanner sc = new Scanner(System.in);
// Input no. of vehicles
int v = sc.nextInt();
// Input no. of wheels
int w = sc.nextInt();
// Checking given constraints
if(v>w || w%2!=0 || w < 2) System.out.println("INVALID INPUT");
int tw = ((v*4)-w)/2;
// v*4 gives us the no. of wheels reqd to create v no. of 4 wheelers.
// (v*4)-w gives us the no. of wheels that we are short of.
// Finally we use these remaining wheels to create Two Wheelers so ,((v*4)-w)/2.
int fw = v-tw;
System.out.println("TW = "+tw);
System.out.println("FW = "+fw);
}
}
Bro help me for code Accenture exam
Please help me in my exam Instragraan I'dd bhavani _16_0
Bring more videos related to ACCENTURE..!
Much Needed.
Good to understand
Bring more videos related to ACCENTURE..!
Much Needed..❤
First we will take input for 'v' and 'w'. And initializing tw=0 and fw=0
If (w>=2 && w%2==0 && v
@@pallavigupta4408 Why you copied my answer....😑
It's solving two equations
Accenture is upcoming to our campus placement soon
Need more videos to to Crack all the 3 rounds
How are you preparing for coding rounds?
Same here
Which College ?
@@thecodingrookieFor us also Accenture is coming soon for recruitment and the clg name: Avanthi Institute of engineering and technology
Accenture will be in my college soon these videos are must needed
In the first question greedy approach should have been followed.
Nice to clear my accenture test in my campus placement
Kise Kiya apne muje bhi kuch tips do next month hai
bhai kitane ka ctc diya h aap ke collage m
@@unknownseries8011 abhi ni bola
@@unknownseries8011tips do na
hey did you also clear the interview? And did they ask anything about project in the interview round?
import numpy as np
# Coefficients of the equations
A = np.array([[1, 1], [2, 4]])
B = np.array([200, 540])
# Solving the system of equations
solution = np.linalg.solve(A, B)
# Extracting the number of two-wheelers and four-wheelers
two_wheelers = int(solution[0])
four_wheelers = int(solution[1])
print(f"Two wheelers = {two_wheelers}")
print(f"Four wheelers = {four_wheelers}")
v=int(input("vehicle:"))
w=int(input("wheels:"))
if w%2==0 and 2
Question?
What is the output
Please help me in my exam Instragraan I'dd bhavani _16_0
Please help me in my exam Instragraan I'dd bhavani _16_0
in the first question, they have asked minimum, so should we not sort the array first?
Sorting the array is not necessary in this case because the problem asks for the minimum number of houses required in the order they are given to provide enough food for the rats. The idea is to accumulate food house by house and stop as soon as you reach or exceed the required amount. This approach respects the original order of the houses, which is important because the question implies sequential distribution rather than an optimal selection from unordered data.
I think this can be understood based on sample cases
@@soothingminds8866 But that isn't mentioned
waah bhai aaj array input lene ka ek naya tareeka sikha mene.
vehicles=int(input("enter no of vehicles: "))
wheels=int(input("enter no of wheels: "))
if wheels % 2 ==1 or wheels < 2 or wheels
Please help me in my exam Instragraan I'dd bhavani _16_0
V = int(input("Enter the total number of vehicles: "))
W = int(input("Enter total wheels: "))
if V >= W or W < 2 or W % 2 != 0:
print("INVALID INPUT")
TW = (4*V - W) // 2
FW = V - TW
print("TW =",TW)
print("FW =",FW)
Question number?
Please help me in my exam Instragraan I'dd bhavani _16_0
let x denote 2 wheelers and y denote 4 wheelers vehicles
x+y=v
2x+4y=w
y=v-x
2x+4(v-x)=w
4v-w=2x
x=(4v-w)/2
y=v-x=v-(4v-w)/2=(w-2v)/2
Now once we get v and w inputs , we can easily calculate x and y using above problems in program.
In my clg next month Accenture will come for on campus placement....i need prepinsta prime
Which college are you studying?
13:04
v = int(input("Enter the total number of vehicles: "))
w = int(input("enter total wheels: "))
tw=(4*v-w)//2
fw=v-tw
print(tw)
print(fw)
'''
Time Complexity: O(1)
Space Complexity: O(1)
"'
Keep uploading more videos on Accenture coding questions so that it will be helpful for students like me a lot.......
This code showing error
Please help me in my exam Instragraan I'dd bhavani _16_0
Your people are doing a great thing
Hello sir @PrepInsta
this question is saying to minimum number of house to feed all the rats so the ans should be 2 (8,7)
because in this, there is no any classification that the no. of house should be in a sequence.
or ager sequence me bhi rakhna hota to bhi and 3 hi data (8,3,5)
then
why 4?
pls explain in java or c++
Such a great Full video for us 💗 thank you sir 🙏
in this question we can use Kadans Algorithm.
In Accenture coding round which type of editor we get, like leetcode wherevjust have to complete the function or codechef like we have to write code from scratch?
complect video on accenture sylabus and test pattern
In 1st qn since it was asked minimum number of houses then why in the example we took 4 houses, houses with food 8 and 7 will also make 8+7 > 14 and num of houses will be 2?
yes we need to first sort the array and apply the food required then we get minimum houses
It is more easily exaplained in prepinsta about the test
Can i use and inbuilt fuctions of STL in C++?
when is accenture conducting their online assessments
for better performance do leetcode easy and mid lvl questions
def calculation(V, W):
if (W < 2 or W % 2 != 0 or V > W):
print("Invalid inputs")
else:
Y = (W - 2 * V) / 2
X = V - Y
print(X, Y)
calculation(200, 540)
Please help me in my exam Instragraan I'dd bhavani _16_0
Java program to calculate vehicle manufacture :
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner x = new Scanner(System.in);
System.out.print("enter total number of vehicles : ");
int v = x.nextInt();
System.out.print("enter total number of wheels : ");
int w = x.nextInt();
if(2 0) {
System.out.println("total four wheeler needed : "+fw);
System.out.println("total two wheeler needed : "+tw);
} else {
System.out.println("INVALID INPUT");
}
}
}
Excellent 👍
Please help me in my exam Instragraan I'dd bhavani _16_0
In first question (8+7) > 14 minimum number is 2
v = 200
w = 540
if w
Please help me in my exam Instragraan I'dd bhavani _16_0
this question demand the min no of house then why its output is 4. the correct ans would be 8,3,5 (3)....using greeedy or dp something...how you can solve this by starting at index 0.??can someone please correct me if im wrong with it ...
I have a doubt..
Only 2nd house (8 unit of food) and 5the house (7 unit of food) is more than enough for all rats...
Then why output is 4 houses ?
exactly i was thinking the same
why are we not applying greedy approach here
Exactly, first I saw the question I though it should be done with sorting @@rohanchawla9955
@@rohanchawla9955i think we don't have to change the order of houses. If you found out this question reply
The answer for last question
V=int(input("Enter the no of vehicle"))
W=int(input("Enter the no of Wheels"))
if 2
Help.can someone explain to me about the constraints? 🥺 And how to conclude in that equation? 🙏🏻 Thanks in advance 💖
Please help me in my exam Instragraan I'dd bhavani _16_0
thanks for this series
To solve the problem of finding the number of two-wheelers and four-wheelers given the total number of vehicles and wheels, you can use a system of linear equations.
Let's denote:
x as the number of two-wheelers (each having 2 wheels).
y as the number of four-wheelers (each having 4 wheels).
Given:
v as the total number of vehicles.
w as the total number of wheels.
The equations are:
𝑥
+
𝑦
=
𝑣
x+y=v (Total number of vehicles)
2
𝑥
+
4
𝑦
=
𝑤
2x+4y=w (Total number of wheels)
From equation 1, you can express y as:
𝑦
=
𝑣
−
𝑥
y=v−x
Substitute this into equation 2:
2
𝑥
+
4
(
𝑣
−
𝑥
)
=
𝑤
2x+4(v−x)=w
This simplifies to:
2
𝑥
+
4
𝑣
−
4
𝑥
=
𝑤
2x+4v−4x=w
2
𝑣
−
2
𝑥
=
𝑤
−
4
𝑣
2v−2x=w−4v
𝑥
=
4
𝑣
−
𝑤
2
x=
2
4v−w
After calculating x, you can find y using:
𝑦
=
𝑣
−
𝑥
y=v−x
Total Wheels = 540
Total Vehicle = 200 (2 wheels + 4 wheels )
so
x+y = 200 ----- total vehicle
2x + 4y = 540 -------- total Wheels
from equation
y = 200-x ------(put in equation )
2x + 4*(200-x) = 540
2x + 800 - 4x = 540
800 - 2x = 540
-2x = -260
x = 130 --------(put in equation 1);
130 + y = 200
y = 70;
so
x =130
y = 70
now you get the solution
code :
public class sol{
main{
findNoOfVehical(200,540)
}
public static void findNoOfVehical(int v , int w){
int x; // 2 wheeler
int y; // 4 wheeler
x = (4 * totalVehicles - totalWheels) / 2;
y = 200 - x
sout(x);
sout(y)
}
}
Java Code
import java.util.Scanner;
public class TwoWhellerFourWhellerProduction {
public static void isValidProduction(){
Scanner s = new Scanner(System.in);
System.out.print("Accept value of V.");
int V = s.nextInt();
System.out.print("Accept value of W.");
int W = s.nextInt();
if(W % 2 != 0 || V>W || 2>W){
System.out.println("INVALID INPUT");
}
int TW, FW;
TW = (4*V - W)/2;
FW = V-TW;
System.out.println("TW:"+TW+ " and FW:"+FW);
}
public static void main(String[] args) {
isValidProduction();
}
}
import java.util.*;
public class MyClass
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int v= sc.nextInt();
int w= sc.nextInt();
int x=0;
if(w w){
System.out.println("INVALID INPUT");
}
else
{
x = (4*v -w)/2;
System.out.println("TW =" + x +" FW = "+ (v-x) );
}
}
}
Please help me in my exam Instragraan I'dd bhavani _16_0
for this type of question develop the formula , it take hardly 10 min. and all the test cases will easily passed
Can I get prime please??
nhi
we are told to define a function which accpets 3 parameters. you have taken a function which accept 4 parameters?
How many of you Got the mail that test will be between 5-16 of july...But didnt get the mail update
First we will take input for 'v' and 'w'. And initializing tw=0 and fw=0
If (w>=2 && w%2==0 && v
One more thing in else part we will print('INVALID STATEMENT ')
V = int(input("Number of vehicles: "))
W = int(input("Total number of wheels: "))
if V >= W or W < 2 or W % 2 == 1:
print("INVALID INPUT")
else:
TW = 2*V - W // 2
FW = V - TW
print("TW =",TW)
print("FW =",FW)
Please help me in my exam Instragraan I'dd bhavani _16_0
import java.util.*;
public class MyClass
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a= sc.nextInt();
int b= sc.nextInt();
int c=0;
if(c c){
System.out.println("INVALID INPUT");
}
else
{
c = (4*b -c)/2;
System.out.println("two wheeler =" + c +" four wheeler = "+ (b-c) );
}
}
}
Time complexity is O(1) for calculating number of tyres
#include
#include
int main()
{
int i, vehicle, wheel, twCount=0, fwCount=0;
printf("Enter vehicle that should be manufactured : ");
scanf("%d",&vehicle);
printf("
Enter wheel number : ");
scanf("%d",&wheel);
if(wheel>2 && wheel%2==0 && vehicle*2
v=int(input("no of vehicles:"));
w=int(input("no of wheels:"));
if(2
Please help me in my exam Instragraan I'dd bhavani _16_0
v=int(input("Enter number of vechiles : "))
w=int(input("Enter number of wheels : "))
if(w
Please help me in my exam Instragraan I'dd bhavani _16_0
Thank you sir
class No_of_Vehicles {
public static void main(String[] args) {
int v=200;
int w=540;
no_of_vehicles(v,w);
}
public static void no_of_vehicles(int v,int w){
int two_wheel,four_wheel;
four_wheel=(w-2*v)/2;
two_wheel=v-four_wheel;
System.out.println("Number of 2 wheel vehicles:"+two_wheel);
System.out.println("Number of 4 wheel vehicles:"+four_wheel);
}
}
def wheels(Tw,Fw):
Sum=(Tw*2)+(Fw*4)
print(Sum)
Tw=int(input("enter the no. of TW = "))
Fw=int(input("enter the no. of FW = "))
wheels(Tw,Fw)
Please help me in my exam Instragraan I'dd bhavani _16_0
In coding can i choose any one programme
//java code
static void count(int v, int w) {
int temp =(w-(2*v));
if(temp==0){
System.out.println("only twoWheeler are there : "+ v);
}else if(temp
rat=int(input())
unit=int(input())
n=int(input())
a=[]
sum=0
for i in range(n):
a.append(int(input()))
rqfood=rat*unit
for j,m in enumerate(a,1):
sum+=m
if sum>rqfood:
print(j)
break
Please help me in my exam Instragraan I'dd bhavani _16_0
public class No_of_vehiciles {
public static void main(String[] args) {
Scanner obj = new Scanner(System.in);
numOfVh(obj.nextInt(),obj.nextInt());
}
public static void numOfVh(int v, int w){
int x=0; // two wheelers
int y =0; // four wheelers
int r = w-(2*v);
y=r/2;
x=v-y;
System.out.println("Number of Two wheelers is " + x);
System.out.println("Number of four wheelers is " + y);
}
}
v = int(input("Enter the total number of vehicles: "))
w = int(input("enter total wheels: "))
tw=(4*v-w)//2
fw=v-tw
print(tw)
print(fw)
Please help me in my exam Instragraan I'dd bhavani _16_0
Accenture is coming next month in my college please provide me subscription 🙏
Sir can I solve Accenture coding assessment exam in javascript..... ?because in their company page they only mentioned c,c++,java, python languages....
question no 1 answer is wrong because we have to get the houses which has maximum unit food so the requirement fulfill in minimum houses
I joined in today's live in insta but there is no possibility of getting prime. For my career
class HelloWorld {
public static void main(String[] args) {
int w=540;
int TW,FW;
int n=200;
TW=((4*n)-w)/2;
FW=n-TW;
System.out.println(TW);
System.out.println(FW);
}
} please do a like
v=int(input("Enter v:"))
w=int(input("Enter w:"))
if v>=w or w
v=int(input("vehicle:"))
w=int(input("wheels:"))
if w%2==0 and 2
Please help me in my exam Instragraan I'dd bhavani _16_0
Help.can someone explain to me about the constraints? 🥺 And how to conclude in that equation? 🙏🏻 Thanks in advance 💖
Sir group is full please make a another group please sir
I will complete my graduation in 2026..but i want to prep now kuch bhi ho jaye but job apne ko chahiye mtlab mtlab chahiye
By 2026 ,prefer for gate exam insted
Next month we have campus placement for Accenture plz provide prepinsta prime
From which college?
last question is binary search
ur voice is very slow pleas use mic
24 hrs working aggreement in Accenture 😢
Really??
Yes, one of my friend rejected the offer letter to this agreement
V = int(input().strip())
W = int(input().strip())
if W < 2 or W % 2 != 0 or V >= W:
print("INVALID INPUT")
else:
TW = 2 * V - (W // 2)
FW = V - TW
if TW < 0 or FW < 0:
print("INVALID INPUT")
else:
print(f"TW={TW}")
print(f"FW={FW}")
Pls help me in my exam Instragraan I'dd bhavani_16_0
Sir please correct the question first , minimum number of houses visited we have to find !!😁😁😄😄
Is it online or offline?
Hi bro, i have one doubt that my graduation aggregate is 60% exactly, can i able to attend this role or not , please reply me if anyone knows about this, please !
recently i got a mail from accenture regarding to the upcoming assessments, so if anyone knows about cutoff of a percentage please reply me !
done !
v = 200
2 w = 540
if ( w < 2 or W
Please help me in my exam Instragraan I'dd bhavani _16_0
v=int(input())
w=int(input())
x=0
y=0
if w>=2 and w%2==0 and w>v:
y = int((w-2*v)/2)
x = int(v-y)
print("Two wheelers:"+str(x))
print("Four wheelers:"+str(y))
OA dates?
It is python code?
void solve() {
int v, w;
cin >> v >> w;
int to = 0;
int fo = 0;
bool ans = false;
for (int i = 0; i
C++ code
Please any one help me ..for coding.round
Give c++ code too
Tw=(2*V)-(W/2)
FW=V-TW
Prepinsta❤
Hello, I rent accounts on freelance exchanges
import java.util.*;
public class Main
{
public static void main(String[] args) {
System.out.println("Hello World");
Scanner sc=new Scanner(System.in);
int v=sc.nextInt();
int w=sc.nextInt();
int z=w/2;
int cars=z-v;
int bikes=v-cars;
System.out.println(bikes+" "+cars);
}
}
SOLUTION FOR FREE PRIME
in java
import java.util.*;
public class sai
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
int v =s.nextInt();
int w =s.nextInt();
int x=0,y=0;
for(int i=1;i
let noOfTwoWheeler= ((v*4)-w)/2;
let noOfFourWheeler=v-noOfTwoWheeler;///
Other way
let noOfFourWheeler= (w-(v*2))/2;
let noOfTwoWheeler=v-noOfFourWheeler;///
v=int(input("enter vechiles number"))
w=int(input("enteer the wheels no"))
for i in range(0,200):
for j in range(0,200):
if(i+j==v):
two=i
four=j
if(i*2+j*4==w):
print("2wheell 4wheeler",i,j)
break
jai javan jai kisan
fw=(w-2*v)/2;
tw=v-w;
print("%d %d", &tw, &fw);
I hope this two equ can be enough to solve the problem
Bhai nahi hua😢😢
On-campus start hogaya?
Need prime badly 😢
Bhai tumney leliya prime
import java.util.Scanner;
public class Vehcile{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("enter the no of vechiles");
int v = sc.nextInt();
System.out.println("enter the no of wheels");
int w = sc.nextInt();
int tw = (4*v - w)/2;
int fw = v-tw;
if( tw>=0 && fw>=0 && (2*tw + 4*fw == w)){
System.out.println("no.of tw:" +tw);
System.out.println("no.of.fw:" +fw);
}else{
System.out.println("no vaild");
}
}
}
import java.util.Scanner;
public class VehicleProduction {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the total number of vehicles (V): ");
int V = scanner.nextInt();
System.out.print("Enter the total number of wheels (W): ");
int W = scanner.nextInt();
if (W >= 2 * V && W % 2 == 0 && V < W) {
int FW = (W - 2 * V) / 2;
int TW = V - FW;
System.out.println("Number of two-wheelers (TW): " + TW);
System.out.println("Number of four-wheelers (FW): " + FW);
} else {
System.out.println("INVALID INPUT");
}
scanner.close();
}
}