|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияPlease check test 7. I submitted 8 times and I can pass it. I read with gets,fgets.. I think it doesn't have EOLN('\n'). That's crappy. If you read like this: scanf("%d%d\n",&n,&m)... it doesn't work and if you read like this scanf("%d%d",&n,&m);gets(line);.. is working.. Can explain me why is this difference? All the tests: 1) were typed in Windows Notepad manually or 2) were generated by Delphi program via Writeln() procedure It's true. Input is BAD!!! Is "scanf( "\n" );" == "gets( line );"??? Why not? I've not very much exp. in C, but see this bug first time. Maybe, it would be better to read by streams? |
|
|