If anyone of them or more than one problem can be solved by anyone please
send it as soon as possible.
Please try to solve in python

On Fri, 12 Jul 2019 at 23:11, MAHARSHI PATEL <[email protected]>
wrote:

> Please solve this problem
>
> I need it urgently. who is able to solve these problems? please send its
> solutions as soon as possible.
>
> *Problem 1 :*
>
> Problem Description
>
> In a country, there are 'N' slabs for Income tax which are common for all
> age groups and genders. As an income tax officer, investigating a case, you
> have the amount of tax paid by each employee of an organization.
> Considering the income tax slabs and rebates offered, you need to find the
> total amount paid by the organization in salaries to the employees to match
> it with the amount reported by the organization in its filed Income tax
> Returns. Information regarding the income tax slabs, rebate amount and the
> income tax paid by each employee of the organization will be provided.
> Rebate amount is subtracted from the total salary of each employee. Tax is
> calculated on the remaining amount. You need to calculate the sum of total
> salary paid to the employees in that year.
>
> Constraints
>
> Number of tax slabs = Number of percentage on tax slabs
>
> 0<= Rebate, tax paid, slab <=1000000
>
> Input Format
>
> First Line will provide the Amount in each slab, separate by space (' ')
>
> Second Line will provide the percentage of tax applied on each slab.
> Number of values in this line will be same as that in line one, separate by
> space (' ')
>
> Third Line will provide the Rebate considered
>
> Fourth line will provide the tax paid by each employee, separate by space
> (' ')
>
> Output
>
> Total Salary paid by the organization to its employees
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 300000 600000 900000
>
> 10 20 30
>
> 100000
>
> 90000 150000 210000 300000
>
> Output
>
> 5300000
>
> Explanation
>
> Slabs and tax percentage indicate that for salary:
>
> Between 0 - 300000, tax is 0%
>
> Between 300001 - 600000, tax is 10%
>
> Between 600001 - 900000, tax is 20%
>
> Greater than 900001, tax is 30%
>
> First, we exclude the rebate from the salary of each employee. This will
> be the taxable component of salary. Upon, taxable salary apply the slab and
> tax percentage logic. Upon computation, one finds that employees are paid
> amounts 1000000, 1200000, 1400000, 1700000 respectively, as salaries. So,
> the total salary paid to all employees in that year will be 5300000.
>
> *Hint: -* It may be helpful to browse the internet to know general rules
> regarding income tax calculations.
>
> *Problem 2:*
> Roman Iteration
> Problem Description
>
> We know about number systems: The Roman numerals and the alternative
> "place value system" with a given base.
>
> For the purposes of this problem, we limit ourselves to
>
> 1) Roman numerals with values up to 3999 (MMMCMXCIX)
>
> 2) "Place value system" numbers having bases from 2 (with possible symbols
> 0, 1) through 36 (with possible symbols 0, 1, ..., 9, A, ... ,Z)
>
> Consider the following procedure:
>
> 1) Accept a natural number N (in base 10).
>
> 2) If N lies in the closed interval [1,3999], i.e. between 1 and 3999
> (both inclusive), convert N to R, its Roman numeral representation; else
> output N as the result and stop.
>
> 3) Identify the base in which the value of R, now considered to be in
> "place value system", is least and calculate its value in base 10,
> replacing N with this value.
>
> 4) Repeat from step 2.
>
> Constraints
>
> 1 <= N <= 3999.
>
> Input Format
>
> A single Integer N.
>
> Output
>
> Converted N.
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 1
>
> Output
>
> 45338950
>
> Explanation
>
> The procedure goes as follows in this case:
>
> 1: Accept N = 1.
>
> 2: Since 1 lies in [1,3999], covert it to Roman R = I.
>
> 3: The least value of I (in bases 19 and above) is 18 in base 10. Hence N
> = 18.
>
> 4, 2': Repeating step 2, since 18 lies in [1,3999], convert it to R =
> XVIII.
>
> 3': The least value of XVIII (in base 34) is
> 33*34^4+31*34^3+18*34^2+18*34+18 or N = 45338950.
>
> 4', 2'': Repeating step 2, since 45338950 lies outside [1,3999], output
> 45338950 and stop.
>
> Here's how the conversions go: Input = 1 => I => 18 => XVIII => 45338950 =
> Output.
>
> *Problem 3:*
> Dole Out Cadbury
> Problem Description
>
> You are a teacher in reputed school. During Celebration Day you were
> assigned a task to distribute Cadbury such that maximum children get the
> chocolate. You have a box full of Cadbury with different width and height.
> You can only distribute largest square shape Cadbury. So if you have a
> Cadbury of length 10 and width 5, then you need to break Cadbury in 5X5
> square and distribute to first child and then remaining 5X5 to next in queue
>
> Constraints
>
> 0<P<Q<1501
>
> 0<R<S<1501
>
> Input Format
>
> First line contains an integer P that denotes minimum length of Cadbury in
> the box
>
> Second line contains an integer Q that denotes maximum length of Cadbury
> in the box
>
> Third line contains an integer R that denotes minimum width of Cadbury in
> the box
>
> Fourth line contains an integer S that denotes maximum width of Cadbury in
> the box
>
> Output
>
> Print total number of children who will get chocolate.
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 5
>
> 7
>
> 3
>
> 4
>
> Output
>
> 24
>
> Explanation
>
> Length is in between 5 to 7 and width is in between 3 to 4.
>
> So we have 5X3,5X4,6X3,6X4,7X3,7X4 type of Cadbury in the box.
>
> If we take 5X3 :
>
> First, we can give 3X3 square Cadbury to 1st child .Then we are left with
> 3X2. Now largest square is 2X2 which will be given to next child. Next, we
> are left with two  1X1 part of Cadbury which will be given to another two
> children.
>
> And so on
>
>
> *Problem 4:*
> Pattern Printing
> Problem Description
>
> Decode the logic and print the Pattern that corresponds to given input.
>
> If N= 3
>
> then pattern will be :
>
> 10203010011012
>
> **4050809
>
> ****607
>
> If N= 4
>
> then pattern will be:
>
> 1020304017018019020
>
> **50607014015016
>
> ****809012013
>
> ******10011
>
> Constraints
>
> 2 <= N <= 100
>
> Input Format
>
> Single Integer N
>
> Output
>
> *The pattern*
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 3
>
> Output
>
> 10203010011012
>
> **4050809
>
> ****607
>
> Example 2
>
> Input
>
> 4
>
> Output
>
> 1020304017018019020
>
> **50607014015016
>
> ****809012013
>
> ******10011
>
> *Problem 5:*
> Lazy Student
> Problem Description
>
> There is a test of Algorithms. Teacher provides a question bank consisting
> of N questions and guarantees all the questions in the test will be from
> this question bank. Due to lack of time and his laziness, Codu could only
> practice M questions. There are T questions in a question paper selected
> randomly. Passing criteria is solving at least 1 of the T problems. Codu
> can't solve the question he didn't practice. What is the probability that
> Codu will pass the test?
>
> Constraints
>
> 0 < T <= 10000
>
> 0 < N, T <= 1000
>
> 0 <= M <= 1000
>
> M,T <= N
>
> Input Format
>
> First line contains single integer T denoting the number of test cases.
>
> First line of each test case contains 3 integers separated by space
> denoting N, T, and M.
>
> Output
>
> For each test case, print a single integer.
>
> If probability is p/q where p & q are co-prime, print (p*mulInv(q)) modulo
> 1000000007, where mulInv(x) is multiplicative inverse of x under modulo
> 1000000007.
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 1
>
> 4 2 1
>
> Output
>
> 500000004
>
> Explanation
>
> The probability is ½. So output is 500000004.
>
>
> *Problem 6:*
> Uncertain Steps
> Problem Description
>
> Codu is trying to go down stairs from his building to ground floor.
>
> He can go 3 ways:
>
> 1. Walk 1 step at a time.
>
> 2. Extend his legs and go 2 steps at a time.
>
> 3. Jump down 3 steps at a time.
>
> Given n steps, calculate the number of possible ways to reach the ground
> floor, provided he can jump 3 steps at most once during this process.
>
> That is, he can jump down 3 steps only once, but at any time, if he
> wishes, while walking down the stairs.
>
> Constraints
>
> 1 <= N <= 1000000.
>
> Input Format
>
> Single Integer denoting the number of Steps, N.
>
> Output
>
> Number of ways to reach ground floor.
>
> As the number can be huge, give output modulo 1000000007.
>
> Test Case
>
> Explanation
>
> Example 1
>
> Input
>
> 4
>
> Output
>
> 7
>
> Explanation
>
> 1, 1, 1, 1
>
> 1, 2, 1
>
> 1, 1, 2
>
> 1, 3
>
> 2, 1, 1
>
> 2, 2
>
> 3, 1
>
> Number of ways = 7.
>
> On Wed, 19 Jun 2019 at 18:54, efraim tagsip <[email protected]>
> wrote:
>
>> On Monday, April 8, 2019 at 5:20:40 AM UTC+8, Sugam Mankad wrote:
>> > Hello, I'm trying to submit an attempt in python 3 code. The code
>> executes perfectly locally and on other online python compilers. But, the
>> code jam console execution results in Runtime Error. Can anyone help
>> please!!? it's the first problem, the foregone solution.
>> >
>> > Thank you.
>> >
>> > Sugam
>>
>> I have exactly the same problem in python, but when implemented in c++,
>> it was just running correctly. Hoping there's a solution to this.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Code Jam" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-code/776b46be-cd39-4720-a4d4-4858fae70ae5%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CALbcQOuwtWqdtAHZhD2YdgL9s04ob7JXas%3DF0gD48%2BhBzhs%2B0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to