mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2025-02-02 18:00:05 +00:00
P7106 双生独白
R42952433
This commit is contained in:
parent
53f4ef41ba
commit
ad3bb68125
10
problem/P7106/P7106.cpp
Normal file
10
problem/P7106/P7106.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string s;
|
||||
cin >> s;
|
||||
cout << setiosflags(ios::uppercase) << "#" << setfill('0') << setw(2) << hex << (255 - ((isdigit(s[1]) ? s[1] - '0' : s[1] - 'A' + 10) * 16 + (isdigit(s[2]) ? s[2] - '0' : s[2] - 'A' + 10))) << setfill('0') << setw(2) << hex << (255 - ((isdigit(s[3]) ? s[3] - '0' : s[3] - 'A' + 10) * 16 + (isdigit(s[4]) ? s[4] - '0' : s[4] - 'A' + 10))) << setfill('0') << setw(2) << hex << (255 - ((isdigit(s[5]) ? s[5] - '0' : s[5] - 'A' + 10) * 16 + (isdigit(s[6]) ? s[6] - '0' : s[6] - 'A' + 10))) << endl;
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user