Skip to content

Commit

Permalink
Add 24578.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiyabye authored Dec 26, 2024
1 parent 545b044 commit 1f335ad
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions 24xxx/24578.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <iostream>
using namespace std;

void solve(void) {
int n; cin >> n;

for (int i=3; i>=0; i--) {
cout << ((n / 1000) >> i & 1 ? "*" : ".") << " ";
cout << (((n / 100) % 10) >> i & 1 ? "*" : ".") << " ";
cout << (((n / 10) % 10) >> i & 1 ? "*" : ".") << " ";
cout << ((n % 10) >> i & 1 ? "*" : ".") << "\n";
}
}

int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);

solve();
return 0;
}

0 comments on commit 1f335ad

Please sign in to comment.