watchdogs132's blog

By watchdogs132, history, 2 years ago, In English

Link to the question :https://www.spoj.com/problems/FACTCG2/

Link to code : https://ideone.com/4JlHQE

My approach : I basically created a vector Primes where I stored least prime factor of every number . Then for each input , I divide it by its least prime factor and then display the factors . But Judge gives me wrong answer .

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Line #62. Why is there a space after %d? Why not simply

printf( "1" );
for(int i=0;i<ans.size();i++)
  printf(" x %d", ans[i]);
printf("\n");
»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Stupid checkers. Why on earth don't all checkers work like Codeforces? A correct answer is a correct answer, even with different case and spaces!