You are viewing a single comment's thread. Return to all comments →
It's crucial to convert A to long long instead of int, otherwise a few tests fail.
Here's my full solution:
ios_base::fmtflags flags = cout.flags(); cout << setw(0) << "0x" << hex << nouppercase << left << (long long)A << endl; cout.flags(flags); cout << fixed << setw(15) << setprecision(2) << setfill('_') << right << showpos << B << endl; cout.flags(flags); cout << scientific << setw(15) << setprecision(9) << noshowbase << right << C << endl; cout.flags(flags);
Seems like cookies are disabled on this browser, please enable them to open this website
Print Pretty
You are viewing a single comment's thread. Return to all comments →
It's crucial to convert A to long long instead of int, otherwise a few tests fail.
Here's my full solution: