FANCY - EDITORIAL

Getting NZEC.
I’m using Python3 and using input() to read inputs.
Surfed to get the fix of this issue, hence i’m here.

This is how i’m reading inputs.

t = int(input())
for item in range(t):
    s = input().split()

Anyone ???

Hi,
my method looks similar to the one mentioned in the editorial. But it’s giving ‘WA’. Can you guys please point out the reason. Thanks.
Please find the link to my submission [here][1].
[1]: CodeChef: Practical coding for everyone

Wut? ._. ??

Its not called excitement, its called 504 Bad Gateway when submitting answers xD

I also used regex, but in Perl 6, it could be reduced to a one-liner:

for ^get() { put /<<not>>/ ?? 'Real Fancy' !! 'regularly fancy' for get }

Yes, your solution is wrong. Your solution fails on the test “nothing is wrong”.

I hope you found editorial not only scary, but helpful :slight_smile:

Even Discuss knows about your excitement xD

Thats even more scary :frowning:

Even discuss got scared by your editorial~~~

Setter’s solution

1 Like

ACed Solution: CodeChef: Practical coding for everyone
You should print exactly as specified

I could not find your submission but here is my submission i made using above mentioned code.
I think you might be trying on codechef ide and not giving any custom input and NZEC is due to no data in stdin.

Sorry, the issue came up because I used cin.ignore() in a loop. I will be careful before posting next time.

I hope this will Help You alot :
Just Go Through this

And Subscribe my channel Hello World Please.

why did you use getline(cin,s) before starting the while testcase loop?

https://www.codechef.com/viewsolution/33964025
can someone tell me why my solution is wrong ?It satisfies the test cases but

For the same reason you are using cin.ignore.

Well you should consider reading the editorial before asking doubts.

It because we need to ignore the “\n” after reading “t”.
If we don’t do it then the first input string will be an empty string.

Can someone tell me why am I getting the error? Passes all TC with 80ms on my local IDE

for _ in range(int(input())):
    strin = input()
    print ('Real Fancy') if len(strin) <= 100 and strin.find('not ') != -1 else print('regularly fancy')