We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C++
- STL
- Print Pretty
- Discussions
Print Pretty
Print Pretty
Sort by
recency
|
170 Discussions
|
Please Login in order to post a comment
Use format library
This is my code and its passing testcase0 but its failing in other test cases so what is the issue
include
include
using namespace std;
int main() { int T; cin >> T; cout << setiosflags(ios::uppercase); cout << setw(0xf) << internal; while(T--) { double A; cin >> A; double B; cin >> B; double C; cin >> C; int a= static_cast(A); char hex[1000]; std::sprintf(hex,"%X",a); cout<
}
Shittiest code what was that
not able to fiind the error in the below c++ code'
include
include
using namespace std;
void solve() { double a, b, c; cin >> a >> b >> c; cout << showbase << hex << (long long)a << "\n"; //prints the first line
}
int main() { int tt; cin >> tt; while (tt--) { solve(); } return 0; }
I cannot understand the relation of the question between STL, and find nothing. I also look at the solutions and bingo, no one use STL !!!