scanf(%s,arr)" produces WA, while cin >> arr produces AC

Правка en1, от shyam1909, 2021-09-23 07:57:19

I was solving this problem problem .I encountered a problem while inputting the string . In my first submission i used scanf("%s",arr) which resulted in WA. Then i changed the input method to cin >> arr , then the submission became AC. Submission using scanf -> scanf Submission using cin -> cin

Submission using scanf() worked fine in my pc, but not in codeforces.

Can someone help me why does scanf() doesn't work here? Thanks in advance :)

Теги doubt

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский shyam1909 2021-09-23 07:57:19 701 Initial revision (published)