• Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • English APP
  • login
  • Result
  • Today's Puzzle
    • Previous Puzzles
    • Prize & Rules
  • Discussion Board
    • Suggestion Board
    • Trending Articles
  • Maths Tricks
  • Placement Papers
    • Placement Questions
    • Interview Experience
    • Placed user Comment
    • Group Discussion
  • Walkins
    • Corporate Job Exam
    • Government Job Exam
    • Entrance Exam
  • Training
    • Internship
  • Placement Questions

Placement Papers with Solutions

Company

  • 3i-Infotech 345
  • Accenture 548
  • ADITI 81
  • Athenahealth 72
  • CADENCE 37
  • Capgemini 519
  • CMC 49
  • Cognizant 29
  • CSC 480
  • CTS 1340
  • Dell 49
  • Elitmus 44
  • GENPACT 516
  • Google 55
  • HCL 217
  • Hexaware 92
  • Huawei 81
  • IBM 1714
  • IGate 169
  • Infosys 2050
  • L&T 299
  • Microsoft 61
  • Miscellaneous 204
  • Oracle 74
  • Other 95
  • Patni 199
  • Sapient 44
  • Sasken 31
  • Self 38
  • Syntel 530
  • TCS 9109
  • Tech Mahindra 500
  • Wipro 1182

Exam

  • ACIO 119
  • AIEEE 334
  • AMCAT 2636
  • Assessment 108
  • Bank 22
  • CAT 988
  • CMAT 82
  • Cocubes 39
  • Elitmus 2952
  • Exam 39
  • Gate 846
  • GMAT 107
  • Gmate 29
  • GRE 469
  • IIT-JEE 471
  • ITC 28
  • Maths Olympiad 205
  • MBA 3481
  • MCA 32
  • Other 159
  • Others 25
  • R-SAT 111
  • Self 68

Government Jobs Exams

  • Bank Exam 478
  • CDS 57
  • CTET 21
  • IBPS 1258
  • IES EC 44
  • KVPY 364
  • NDA 481
  • NTSE 36
  • REVENUE OFFICE 53
  • RRB 1029
  • SSC 1294
  • UPSC 441

Interview

  • HR Interview 426
  • HR Round 41

Maths Puzzle

  • A website 299
  • Book 23779
  • Campus 250
  • CMAT 49
  • Exam 86152
  • General 399
  • Interview 141
  • M4maths 295
  • Maths 226
  • Orkut 27
  • Other 72
  • Others 1356
  • Reasoning 101
  • Self 3157

Programming and Technical

  • Android 118
  • ASP.NET 60
  • C 459
  • C++ 448
  • DATA STRUCTURE 66
  • DBMS 77
  • ELECTRONICS 39
  • Java 261
  • OOPs Concepts 117
  • Operating Syst 103
  • RDBMS 109
  • UNIX 70
Keep an EYE (0)Interview Experience (261)
Solved Question (6040) UnSolved Question (153944)
Pages: 11
Advertisements

(#M40019807) OTHERS QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

Problem
In a holy village of India, there was a famous Guru. He had a number of followers from different countries. The day came when one of his favourite disciple Shiva was graduating. Filled with gratitude, and as is the ancient Indian custom, Shiva inquired about how he should pay his Guru Dakshina.(Tuition Fees)
The Guru was a wise man. He decided to teach Shiva one last lesson in the Art of Thinking Mathematically. He demanded his Dakshina (Fees) from Shiva in following manner
Guru wanted 100 gems distributed in 7 purses such that number of gems in 7 purses should always sum up to 100. But his condition was that he can demand any number of gems between 1 to 100 and Shiva must be able to satisfy his demand without needing to open any purse. Also once Shiva packs the purses, he will not get another chance to rearrange the number of Gems in those 7 purses. So consider that these purses are sealed the moment Shiva puts appropriate number of Gems in it.
Out of affection, the Guru decided to step up the difficulty level so that Shiva can survive the turbulent world outside the Gurukul. The Guru added one more condition that out of 7 purses Guru will always fill one purse with any number of gems. Thus Shiva need to distribute remaining Gems in rest of the 6 purses.

As,a new techie your task is to write a computer program to help Shiva in fulfilling his Guru's demand.


Input Format:
Input starts with the number of gems in a bag that follower have initially given by his master.
Line 1 N,where N is number of gems in one purse as conditioned by The Guru
Line 2 D, where D is number of gems demanded by The Guru from Shiva


Constraints:
0< N < =100
0 < D < =100
Output Format:
Print Distribution of gems in seven bags in ascending order,followed by the distribution of bags which will fulfill the demand of The Guru in ascending order
Line 1
For Valid Input,print
Distribution of gems in seven bags ordered in ascending,where quantity of gems in each bag is separated by space

For Invalid Input,print
Invalid Input
Line 2
For Valid Input,print
Distribution of bags in ascending order which will fulfill the demand of guru ,where quantity of gems in each bag is separated by space


Sample Test Cases:
SNo. Input Output Explanation
1
37
26
1 2 4 8 16 32 37
2 8 16
The Guru demands that one of the purses should contain 37 Gems. So Shiva packs them in 7 purses as mentioned in the output column.
The Guru now demands 26 Gems, Shiva knows that number of Gems in 3 purses add up to 26. So he gives purses containing 2, 8 and 16 to the Guru. Thus, he satisfies the condition that he does not have to shuffle his original packing.
2
J
25
Invalid Input J is not a number
3
33
150
Invalid Input 150 Gems out of 100 is not a valid demand
4
37
100
1 2 4 8 16 32 37
1 2 4 8 16 32 37
Guru demands 37 Gems be put in one bag and Guru demands a count of 100 Gems. Shiva hands over all 7 purses. Also note that any number between 1 and 100 is achievable using this combination. So Shiva has really satisfied his Guru.

Asked In Others bala (12 years ago)
Unsolved
Is this Puzzle helpful?   (10)   (13) Submit Your Solution Basics

(#M40019806) OTHERS QUESTION Keep an EYE Keep an eye puzzle Keep an eye puzzle

Problem:
A sequence is said to be progressive if it doesn’t decrease at any point in time.
For example 1 1 2 2 is a progressive sequence but 1 2 1 is not a progressive sequence. Let S be the sequence and be represented by T spaced integers Ki, now your task is to find out the first longest progressive sequence present in the given sequence (S).

Input Format:
First line will contain T, the length of the sequence and next line will contain T spaced integers Ki (where i = 0,1, …,T).

Line 1 T,where T is the length of the sequence

Line 2 Ki,where Ki is integer in sequence separated by space

Constraints:
1

Asked In Others bala (12 years ago)
Unsolved
Is this Puzzle helpful?   (17)   (5) Submit Your Solution Program
Advertisements

(#M40019478) OTHERS QUESTION vocabulary Keep an EYE Keep an eye puzzle Keep an eye puzzle

EVAPORATION : CLOUD
choices are:
1. Mountain : Snow
2. Pressure : Atmosphere
3. Book : Pages
4. Tension : Breakdown

Asked In Others bala (12 years ago)
Unsolved Read Solution (2)
Is this Puzzle helpful?   (8)   (0) Submit Your Solution
Keep an EYE (0)Interview Experience (261)
Solved Question (6040) UnSolved Question (153944)
Pages: 11
  • Login
  • Register

Resend

Sponsored Links

Advertisements

Challenger of the Day

no image
Dimple
India
Punjab
Time: 00:01:33
Points
19

Maths Quotes

Mathematics is the Queen of the Sciences

Professor Robert Silensky

It is impossible to be a mathematician without being a poet in soul.

Sofia Kovalevskaya

Placed User Comments

M4Math helped me a lot.

Vipul Chavan 5 years ago

Thanks m4 maths for helping to get placed in several companies.
I must recommend this website for placement preparations.

yash mittal 5 years ago

Now enjoy Offline Access of latest Question.

Get M4maths app to avail expert's solution and latest selected questions.

Download m4maths app now

  • 2533K+Registerd user
  • 1774K+Engineers
  • 759K+MBA Asprirant
  • 3K+Enginnering College
  • 250+Company Exam
  • 150K+Interview Questions
  • Site Links
  • Home
  • Result
  • Today's Puzzle
  • Discussion Board
  • Maths Tricks
  • Advertise with us
  • Contact Us
  • Useful Info
  • Maths Quotes
  • Previous Puzzles
  • Prize
  • Privacy Policy
  • Disclaimer and Copyright
  • Terms and Conditions
  • Sitemap
  • Placement papers
  • TCS Placement Paper
  • HCL Placement Paper
  • INFOSYS Placement Paper
  • IBM Placement Paper
  • SYNTEL Placement Paper
  • TECHNICAL Interview
  • HR Interview
All rights are reserved to @m4maths.com