Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

Same Code,Different Languages,Different Result

Revision en2, by NoCommander, 2023-08-06 10:07:41

217414890

217414841

The above two codes only differ in the submission language.But one gets Accepted,the other gets Wrong answer on test 1.

wrong output format Expected integer, but "?" found (test case 1)

In C++14,it did f(1, n) first and did cout << "! " next.

In C++17,it did cout << "! " first and did f(1, n) next.

Before C++17, the order of << was not specified.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English NoCommander 2023-08-06 14:02:38 4 Tiny change: 'clearly,`A<<B<<C`,`A`,`B`' -> 'clearly,`A << B << C`,`A`,`B`'
en3 English NoCommander 2023-08-06 14:01:52 118
en2 English NoCommander 2023-08-06 10:07:41 0 (published)
en1 English NoCommander 2023-08-06 10:07:27 469 Initial revision (saved to drafts)