11148 - Moliu Fractions

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

Moderator: Board moderators

ayeshapakhi
Learning poster
Posts: 60
Joined: Sun Apr 16, 2006 7:59 pm

Post by ayeshapakhi »

hi...

my acc one gives..

Code: Select all

8/11
220-4/5
36/55
4-4/5
1/230
>>I think there's no such input.
220-4/5
0
There should be no input like test 6.. because denominator is 0 here..
mukit
New poster
Posts: 48
Joined: Wed Nov 21, 2007 10:09 am
Location: Dhaka , Bangladesh
Contact:

Re: 11148 - Moliu Fractions

Post by mukit »

Getting WA. Please give some I/O

Code: Select all

Removed after Accepted.
Thank's in advance.
mukit
New poster
Posts: 48
Joined: Wed Nov 21, 2007 10:09 am
Location: Dhaka , Bangladesh
Contact:

Re: 11148 - Moliu Fractions

Post by mukit »

Forget my previous post. Got AC.
Shafaet_du
Experienced poster
Posts: 147
Joined: Mon Jun 07, 2010 11:43 am
Location: University Of Dhaka,Bangladesh
Contact:

Re: 11148 - Moliu Fractions

Post by Shafaet_du »

this will help you:

Code: Select all

6
this problem11148 is a little tricky for who solved less that 20 problems
i got4 wa in this problem 1/2of the world is water
there are 23such case and 23i is a imaginary number at 23-2/23 when 12/1 is 0/12
i dont kn23ow what the hell i am writing4-1/4 but this will 555 help you 5/124 for sure
12hope23 you34er have found your mistake 234 by now
23 34 12  23 1 1/1 1/1 2/2 4/5 5-4/3
output:

Code: Select all

222960
2
0
2187-273/496
2195856
1093548-4/5
@c/c++ coders: use strtok() for parsing.
sazzadcsedu
Experienced poster
Posts: 136
Joined: Sat Nov 29, 2008 8:01 am
Location: narayangong,bangladesh.
Contact:

Re: 11148 - Moliu Fractions

Post by sazzadcsedu »

@shafaet_du, Some of your input is wrong.Because the problem statement clearly says-
There is always a space (ASCII #32) immediately after each operand.
Life is more complicated than algorithm.
http://felix-halim.net/uva/hunting.php?id=32359
For Hints: http://salimsazzad.wordpress.com
Post Reply

Return to “Volume 111 (11100-11199)”