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.