Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

How GNU compiler differentiates between " %c" and "%s" in C

$
0
0

In the recent contest (LTIME62B) I made a brute force solution to solve FRCPRT for 30 points. I submitted my solution 2 times. Only difference I made was in the former one I was scanning the input by "%s" (i.e. as a whole string) and in the latter one I was scanning it by "%c". I got WA in the former one but AC for latter one. Can anyone explain me why I got WA with "%s"?

WA SolutionAC Solution


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>