QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#876598 | #2920. Ultimate Binary Watch | mostafay | WA | 0ms | 3712kb | C++14 | 1.1kb | 2025-01-31 04:18:32 | 2025-01-31 04:18:33 |
Judging History
answer
#include <bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define output freopen("~/output.txt","w",stdout);
#define input freopen("~/input.txt","rt",stdin);
#define print(v) for(auto &ele:v)cout<<ele<<" "
#define cin(v) for(auto &ele:v)cin>>ele
#define pp pair<int ,int>
#define all(v) v.begin(),v.end()
#define rv(x) return void(x)
#define ln cout<<"\n";
#define yes cout<<"YES"
#define no cout<<"NO"
#define ll long long
#define vc vector
using namespace std;
int xd[4] = {-1, 0, 1, 0};//,-1,-1, 1, 1};
int yd[4] = {0, 1, 0, -1};//, 1,-1, 1,-1};
//===============================The solution===============================
void solve() {
string s;
cin >> s;
for (int i = 3; i >= 0; --i) {
for (int j = 0; j < 4; ++j) {
int d = s[j] - '0';
if ((1 << i) & d)cout << '*';
else cout << '.';
if (j == 1)cout << " ";
}
cout << '\n';
}
}
int main() {
fast
int t = 1;
// cin >> t;
while (t--) {
solve();
ln
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3712kb
input:
1234
output:
.. .. .. .* .* *. *. *.
result:
wrong answer 1st lines differ - expected: '. . . .', found: '.. ..'