i've WA!!! and i've tested my prog with this input, and all worked right:
zero hundred
zero hundred million
hundred million
negative nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety nine
nine hundred ninety nine thousand nine hundred ninety nine
nine hundred ninety
zero
six
negative seven hundred twenty nine
one million one hundred one
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
twenty
twenty two
eighty eight
eighty
hundred
thousand
-----------------
negative one hundred fifty thousand
--------------------
one thousand fifty
--------------------
negative twelve million twelve thousand
-------------------
eight hundred eighty eight million
------------------
two million two thousand twelve
-------------------------
eight hundred eighty eight million eight hundred eighty eight thousand eight hundred eighty eight
--------------------------
nine hundred million one hundred two thousand one hundred eleven
-----------------------
one hundred eleven million eleven
----------------------
seven hundred nine million nine hundred
-----------------------
nine hundred nine thousand nine
------------------------
eight hundred eighty eight
----------------------
eighty eight million eighty eight thousand eighty eight
------------------------
nine hundred nine thousand nine hundred
------- means : separation between different input.
And the outputs should be :
-150000
1050
-12012000
888000000
2002012
888888888
900102111
111000011
709000900
909009
888
88088088
90990
Also my AC program outputs all 0 for your first 3 inputs and last 2 inputs. And I don't think those are valid inputs that the judge use.
I have tested my problem with every possible input but still it is giving my runtime error . i dont know how to correct it . i have also tested this problem on gnu complier. plz help
you are using functions like strlen() and strcmp() which requires the header file <string.h> .
Perhaps you did not get compile error on your local machine because it was included by default.
One other issue, if you ever post source code, it is better that you disable smilies, otherwise section of your code may become smily faces.
In your code u used strlen which needs string.h header file. Again you used [for(int i =0; ..; ..) ] this format that is inside for loop declaration
of a variable which give compile error. Correct this and try again.
wish your best.
nine hundred ninety nine million
nine hundred nine million
nine hundred million
nine million
ninety million
ninety nine million
nine hundred ninety nine million ninety nine thousand ninety nine
nine hundred ninety nine million nine hundred ninety nine thousand ninety nine
nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety nine
nine hundred ninety nine million nine hundred ninety
nine
ninety
ninety nine
nine hundred nine
nine hundred
nine hundred ninety nine
nine hundred thousand
nine hundred ninety nine thousand
nine hundred nine thousand
nine thousand
nine thousand ninety nine
nine hundred ninety nine thousand ninety nine
nine hundred ninety nine thousand nine hundred ninety nine
six
negative seven hundred twenty nine
one million one hundred one