mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
P6382 『MdOI R2』Car
R39592154
This commit is contained in:
parent
5fda59af39
commit
94f1ba668f
23
problem/P6382/P6382.cpp
Normal file
23
problem/P6382/P6382.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
// R39592154
|
||||
|
||||
#include<bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string name;
|
||||
cin >> name;
|
||||
if(name[0] != 'M' || name[1] != 'D' || name[2] != 'A') {
|
||||
cout << "1 1 1 1 1" << endl;
|
||||
} else {
|
||||
int i = 7;
|
||||
while(!('0' <= name[i] && name[i] <= '9')) i--;
|
||||
int last = name[i] - '0';
|
||||
cout << (last == 1 || last == 9 ? 1 : 0) << ' ';
|
||||
cout << (last == 2 || last == 8 ? 1 : 0) << ' ';
|
||||
cout << (last == 3 || last == 7 ? 1 : 0) << ' ';
|
||||
cout << (last == 4 || last == 6 ? 1 : 0) << ' ';
|
||||
cout << (last == 5 || last == 0 ? 1 : 0) << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user