## 944 - Happy Numbers

Moderator: Board moderators

bishop
New poster
Posts: 43
Joined: Fri May 04, 2007 12:57 pm

### 944 - Happy Numbers

i solved 10591
it seem me like that
i solve like that problem
judge show WA

Code: Select all

``````
``````
Last edited by bishop on Mon Jul 23, 2007 8:10 pm, edited 2 times in total.

rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan
Every line contains two positive integers between 1 and 99999 each
There is a case which lower limit is 1. (checked by assert())
The statement should include term "inclusive".

ADD : There is also a case which H < L.
----
Rio

bishop
New poster
Posts: 43
Joined: Fri May 04, 2007 12:57 pm

### check

i do that but still WA
next code that post

rio
A great helper
Posts: 385
Joined: Thu Sep 21, 2006 5:01 pm
Location: Kyoto, Japan
Some io test case.
INPUT

Code: Select all

``````7 10
1 7
10 4
10 10
``````
OUTPUT

Code: Select all

``````7 6
10 2

1 1
7 6

10 2
``````
----
Rio

Roger Isanta
New poster
Posts: 3
Joined: Mon Jul 23, 2007 3:27 pm
Hi,
I did the input, and Rio, you are right. Thanks.

There's a case in which L>H, this is going to be fixed, so that all test cases are L<=H.

However, this is not the reason why bishop is getting WA.

Roger
Last edited by Roger Isanta on Mon Jul 23, 2007 4:19 pm, edited 2 times in total.

Roger Isanta
New poster
Posts: 3
Joined: Mon Jul 23, 2007 3:27 pm
Bishop try this in/out:

IN:
1111 1120

OUT:
1112 7
1114 6
1115 5

bishop
New poster
Posts: 43
Joined: Fri May 04, 2007 12:57 pm

### then why for WA944

all are checked
but it show WA

Code: Select all

``````accepted
``````
Last edited by bishop on Tue Jul 24, 2007 4:59 pm, edited 1 time in total.

Roger Isanta
New poster
Posts: 3
Joined: Mon Jul 23, 2007 3:27 pm
Hi bishop,

the only thing I think is wrong in your code is that you output a new line after each case, while it should be between each case.

The input has been changed and now it's correct. Try now.

Roger

bishop
New poster
Posts: 43
Joined: Fri May 04, 2007 12:57 pm
thanx
roger isanta && rio

thanx for input output

mohsincsedu
Learning poster
Posts: 63
Joined: Tue Sep 20, 2005 12:31 am
Location: Dhaka
Contact:

### Description

Input

The input has two lines which contain a positive integer between 1 and 99999 each; the first integer, L, is the low limit of the closed interval; the second one, H, is the high limit

why multiple i/o??
Amra korbo joy akhdin............................

shakil
Learning poster
Posts: 74
Joined: Sat Jul 15, 2006 6:28 am
Contact:

Code: Select all

``````Thanks jan
``````
Last edited by shakil on Wed Nov 14, 2007 6:11 am, edited 1 time in total.
SHAKIL

Jan
Guru
Posts: 1334
Joined: Wed Jun 22, 2005 10:58 pm
Contact:
newlines should be printed between cases.
Ami ekhono shopno dekhi...
HomePage

Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am
Contact:

### Make me cruel...

Hi,
I cant find any bug in my code...can any one give any hints wht is tricks behind it.
i check all the cases in the board but still wA..

Rocky

Rocky
Experienced poster
Posts: 124
Joined: Thu Oct 14, 2004 9:05 am
Contact:

### Re: 944 - Happy number--Got acc

Thnx
Got Ac Now.

Rocky

kissu parina
New poster
Posts: 19
Joined: Thu May 20, 2010 8:58 am

### Re: 944 - Happy number

just dont output a blank line after the last case and i also swaped the values if L>H
hope it helps
one day...