182 - Bonus Bonds

All about problems in Volume 1. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
jpfarias
Learning poster
Posts: 98
Joined: Thu Nov 01, 2001 2:00 am
Location: Brazil
Contact:

Problem 182

Post by jpfarias » Mon Apr 14, 2003 1:36 am

Can anyone explain me what I have to do in this problem?

I've read it and didn't understand nothing!

JP

bobi1978
New poster
Posts: 13
Joined: Tue Jul 22, 2003 1:57 pm
Location: Kavadarci, Macedonia
Contact:

I don't understan the problem

Post by bobi1978 » Thu Aug 14, 2003 10:56 pm

I have the same problem.
I don't understand nothing, too.
Anyone can explain what shoul I do!!!

User avatar
UFP2161
A great helper
Posts: 277
Joined: Mon Jul 21, 2003 7:49 pm
Contact:

Post by UFP2161 » Sat Aug 16, 2003 12:40 am

4810000000 1
So, it's asking how many times each digit would've occured in the first digit of the number (here, the 4), if the bonds all started being numbered at 0000000000.

Code: Select all

  100000000 <-- that many zeros occurred in the first digit
  100000000 <-- that many ones occurred in the first digit
  100000000 <-- .. twos ..
  100000000 <-- .. threes ..
   80000000 <-- .. fours ..
          0 <-- .. fives ..
          0 <-- .. sixes ..
          0 <-- .. sevens ..
          0 <-- .. eights ..
          0 <-- .. nines ..
Also, for the frequencies, since it gives you the NEXT bond number, you should not include this number in the frequency counts, to the best of my knowledge.

Hope that clears some stuff up!

User avatar
Donotalo
Learning poster
Posts: 56
Joined: Sat Aug 20, 2005 11:05 am
Location: Bangladesh

182 - Bonus Bonds - Wrong Answer

Post by Donotalo » Fri Nov 25, 2005 1:20 pm

i couldn't understand why i'm getting wrong answer. it runs expectedly in my machine. is there any critical input? here is what i've tested:
4810000000 1
100000000
100000000
100000000
100000000
80000000
0
0
0
0
0

0123456789 6
400000
400000
400000
400000
400000
181440
0
0
0
0

9876543210 2
100000000
100000000
100000000
100000000
100000000
100000000
100000000
100000000
252000
0

0030000000 6
0
0
0
0
0
0
0
0
0
0
0123456789 2
10000000
544320
0
0
0
0
0
0
0
0

0000000000 0

User avatar
Donotalo
Learning poster
Posts: 56
Joined: Sat Aug 20, 2005 11:05 am
Location: Bangladesh

Post by Donotalo » Fri Nov 25, 2005 5:25 pm

well, i've changed my code slightly and remove a small bug. still i'm getting WA :cry: ... Inputs (with Output) i tried:

Code: Select all

4810000000 1
  100000000
  100000000
  100000000
  100000000
   80000000
          0
          0
          0
          0
          0

0123456789 6
     400000
     400000
     400000
     400000
     400000
     181440
          0
          0
          0
          0

9876543210 2
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
     252000
          0

0030000000 6
          0
          0
          0
          0
          0
          0
          0
          0
          0
          0

3504555789 1
   99999999
  100000000
  100000000
    4199040
          0
          0
          0
          0
          0
          0

3504555789 8
    2591999
    2592000
    2592000
    2592000
    2592000
    2592000
    2592000
    2099520
          0
          0

0000000001 10
          0
          0
          0
          0
          0
          0
          0
          0
          0
          0

0000000002 10
          0
          1
          0
          0
          0
          0
          0
          0
          0
          0

0000000000 0
each output is set a minimum width length of 11, right justified. why i'm getting wrong answer? is there any critical/special input?[/code]

User avatar
Donotalo
Learning poster
Posts: 56
Joined: Sat Aug 20, 2005 11:05 am
Location: Bangladesh

182 - Bonus Bonds

Post by Donotalo » Sun Nov 27, 2005 3:14 pm

Hi friends...
is there any tricky input for problem 182 - Bonus Bonds? I'm getting wrong answer. :cry:

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo » Tue Feb 07, 2006 10:54 pm

the output for some of your test cases are not correct, the correct output for the following should be:

Code: Select all

0123456789 6
    1350000
    1350000
    1350000
    1350000
    1350000
    1346789
    1340000
    1340000
    1340000
    1340000

9876543210 2
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
  100000000
   96543210
   90000000

3504555789 1
   99999999
  100000000
  100000000
   54555789
          0
          0
          0
          0
          0
          0

3504555789 8
   35455599
   35455600
   35455600
   35455600
   35455600
   35455600
   35455600
   35455589
   35455500
   35455500



sds1100
Learning poster
Posts: 95
Joined: Sat Dec 10, 2005 2:09 pm

Post by sds1100 » Fri Mar 03, 2006 8:41 am

^
!
up
very good reply

deadangelx
New poster
Posts: 32
Joined: Tue Feb 13, 2007 1:31 pm

Re: 182 - Bonus Bonds - Wrong Answer

Post by deadangelx » Mon Apr 06, 2009 7:01 pm

some input and output:

input:

Code: Select all

1234567890 1
1234567890 2
1234567890 3
1234567890 4
1234567890 5
1234567890 6
1234567890 7
1234567890 8
1234567890 9
1234567890 10
0000000000 0
output:

Code: Select all

  100000000
   24567890
          0
          0
          0
          0
          0
          0
          0
          0

   20000000
   20000000
   14567890
   10000000
   10000000
   10000000
   10000000
   10000000
   10000000
   10000000

          0
          0
          0
  124567890
          0
          0
          0
          0
          0
          0

   13000000
   13000000
   13000000
   13000000
   12567890
   12000000
   12000000
   12000000
   12000000
   12000000

   12500000
   12500000
   12500000
   12500000
   12500000
   12467890
   12400000
   12400000
   12400000
   12400000

   12460000
   12460000
   12460000
   12460000
   12460000
   12460000
   12457890
   12450000
   12450000
   12450000

   12457000
   12457000
   12457000
   12457000
   12457000
   12457000
   12457000
   12456890
   12456000
   12456000

   12456800
   12456800
   12456800
   12456800
   12456800
   12456800
   12456800
   12456800
   12456790
   12456700

   12456790
   12456790
   12456790
   12456790
   12456790
   12456790
   12456790
   12456790
   12456790
   12456780

   12456789
   12456789
   12456789
   12456789
   12456789
   12456789
   12456789
   12456789
   12456789
   12456789
Hope it will help.

stock-guy
New poster
Posts: 1
Joined: Thu Oct 07, 2010 11:44 am

Re: 182 - Bonus Bonds - Wrong Answer

Post by stock-guy » Thu Oct 07, 2010 5:43 pm

Thanks for great reply it really helped
Investors planning to invest in Penny Stocks should subscribe to our newsletter.

farasat1001
New poster
Posts: 1
Joined: Mon Feb 16, 2015 1:30 pm

Re: 182 - Bonus Bonds

Post by farasat1001 » Mon Feb 16, 2015 1:32 pm

Hi friends...
is there any tricky input for problem 182 - Bonus Bonds? I'm getting wrong answer. :cry:
Decrease your exam stress by using our latest Pass4sure 1Y0-200 and best quality rasmussen.edu We provide with 100% pass guarantee along with bentley.edu and passguide.

Post Reply

Return to “Volume 1 (100-199)”