Tata Steel 11am Answers
Q1) seven men M1
60kg
B
Q3) the avarage marks
B
63
Q4) a man travels
16km/hr
Q5) in a test a student got
D
120.
Q6) 200 people
15
B
Q7) there are two sections
A
36years
Q8)there are 5 people
C
Uncertain
Q9) there are 6 countries
A
True
10)there are 5 cities
C
Verbal ability
Q1) we had dinner
Option a
Ans a
Q2) she knows
C
Knowing
Q3) the following questions
D
No error
Q1) seven men M1
60kg
B
Q3) the avarage marks
B
63
Q4) a man travels
16km/hr
Q5) in a test a student got
D
120.
Q6) 200 people
15
B
Q7) there are two sections
A
36years
Q8)there are 5 people
C
Uncertain
Q9) there are 6 countries
A
True
10)there are 5 cities
C
Verbal ability
Q1) we had dinner
Option a
Ans a
Q2) she knows
C
Knowing
Q3) the following questions
D
No error
Tata Steel
Coding Marathon
Python 3โ
Coding Marathon
Python 3โ
int countNecklaces(int maxPearls, int startMagnificence, int endMagnificence) {
int count = 0;
for (int pearls = 1; pearls <= maxPearls; pearls++) {
for (int magnificence = startMagnificence; magnificence <= endMagnificence; magnificence++) {
if (pearls == 1) {
count++;
} else {
int prevCount = count;
for (int prevMagnificence = startMagnificence; prevMagnificence <= magnificence; prevMagnificence++) {
count += prevCount;
}
}
}
}
return count;
}
C++โ
Charles and Neckless
int count = 0;
for (int pearls = 1; pearls <= maxPearls; pearls++) {
for (int magnificence = startMagnificence; magnificence <= endMagnificence; magnificence++) {
if (pearls == 1) {
count++;
} else {
int prevCount = count;
for (int prevMagnificence = startMagnificence; prevMagnificence <= magnificence; prevMagnificence++) {
count += prevCount;
}
}
}
}
return count;
}
C++โ
Charles and Neckless