Codeforces и Polygon могут быть недоступны в период с 6 декабря, 22:00 (МСК) по 7 декабря, 00:00 (МСК) в связи с проведением технических работ. ×

Same Code,Different Languages,Different Result

Правка en4, от NoCommander, 2023-08-06 14:02:38

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.

update:Thanks to balalaika,more clearly,A << B << C,A,B and C can be evaluated in any order.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский NoCommander 2023-08-06 14:02:38 4 Tiny change: 'clearly,`A<<B<<C`,`A`,`B`' -> 'clearly,`A << B << C`,`A`,`B`'
en3 Английский NoCommander 2023-08-06 14:01:52 118
en2 Английский NoCommander 2023-08-06 10:07:41 0 (published)
en1 Английский NoCommander 2023-08-06 10:07:27 469 Initial revision (saved to drafts)