QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#132168 | #2920. Ultimate Binary Watch | Mohamedali94316 | AC ✓ | 1ms | 3564kb | C++14 | 1.6kb | 2023-07-29 03:48:58 | 2023-07-29 03:49:02 |
Judging History
answer
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
const ll N = 1e5+7;
int main() {
ios::sync_with_stdio(false);
cout.tie(nullptr);
cin.tie(nullptr);
ll t = 1;
// cin >> t;
while (t--) {
string s;
cin >> s;
string a[4];
int c = 0;
for (int i = 0; i < s.length(); i++) {
if ((s[i]-'0')%2) {
a[0]+="* ";
} else {
a[0]+=". ";
}
c++;
int x = (s[i]-'0')/2;
s[i] = (x+'0');
}
c=0;
for (int i = 0; i < s.length(); i++) {
if ((s[i]-'0')%2) {
a[1]+="* ";
} else {
a[1]+=". ";
}
c++;
int x = (s[i]-'0')/2;
s[i] = (x+'0');
}
c=0;
for (int i = 0; i < s.length(); i++) {
if ((s[i]-'0')%2) {
a[2]+="* ";
} else {
a[2]+=". ";
}
c++;
int x = (s[i]-'0')/2;
s[i] = (x+'0');
}
c=0;
for (int i = 0; i < s.length(); i++) {
if ((s[i]-'0')%2) {
a[3]+="* ";
} else {
a[3]+=". ";
}
c++;
int x = (s[i]-'0')/2;
s[i] = (x+'0');
}
for (int i = 3; i >= 0; i--) {
a[i].pop_back();
cout << a[i] << endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3516kb
input:
1234
output:
. . . . . . . * . * * . * . * .
result:
ok 4 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
0056
output:
. . . . . . * * . . . * . . * .
result:
ok 4 lines
Test #3:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
0708
output:
. . . * . * . . . * . . . * . .
result:
ok 4 lines
Test #4:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
0909
output:
. * . * . . . . . . . . . * . *
result:
ok 4 lines
Test #5:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
0000
output:
. . . . . . . . . . . . . . . .
result:
ok 4 lines
Test #6:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
0001
output:
. . . . . . . . . . . . . . . *
result:
ok 4 lines
Test #7:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
0100
output:
. . . . . . . . . . . . . * . .
result:
ok 4 lines
Test #8:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
2300
output:
. . . . . . . . * * . . . * . .
result:
ok 4 lines
Test #9:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
2359
output:
. . . * . . * . * * . . . * * *
result:
ok 4 lines
Test #10:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
1757
output:
. . . . . * * * . * . * * * * *
result:
ok 4 lines
Test #11:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
0959
output:
. * . * . . * . . . . . . * * *
result:
ok 4 lines
Test #12:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
2007
output:
. . . . . . . * * . . * . . . *
result:
ok 4 lines
Test #13:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
2244
output:
. . . . . . * * * * . . . . . .
result:
ok 4 lines
Test #14:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
1939
output:
. * . * . . . . . . * . * * * *
result:
ok 4 lines
Test #15:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
0117
output:
. . . . . . . * . . . * . * * *
result:
ok 4 lines
Test #16:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
0220
output:
. . . . . . . . . * * . . . . .
result:
ok 4 lines
Test #17:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
1354
output:
. . . . . . * * . * . . * * * .
result:
ok 4 lines
Test #18:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
1201
output:
. . . . . . . . . * . . * . . *
result:
ok 4 lines
Test #19:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
1902
output:
. * . . . . . . . . . * * * . .
result:
ok 4 lines
Test #20:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
2229
output:
. . . * . . . . * * * . . . . *
result:
ok 4 lines
Test #21:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
0749
output:
. . . * . * * . . * . . . * . *
result:
ok 4 lines
Test #22:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
1957
output:
. * . . . . * * . . . * * * * *
result:
ok 4 lines
Test #23:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
0019
output:
. . . * . . . . . . . . . . * *
result:
ok 4 lines
Test #24:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
1127
output:
. . . . . . . * . . * * * * . *
result:
ok 4 lines
Test #25:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
1502
output:
. . . . . * . . . . . * * * . .
result:
ok 4 lines
Test #26:
score: 0
Accepted
time: 1ms
memory: 3464kb
input:
1615
output:
. . . . . * . * . * . . * . * *
result:
ok 4 lines
Test #27:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
1900
output:
. * . . . . . . . . . . * * . .
result:
ok 4 lines
Test #28:
score: 0
Accepted
time: 1ms
memory: 3488kb
input:
0830
output:
. * . . . . . . . . * . . . * .
result:
ok 4 lines