1 条题解
-
2
#include <bits/stdc++.h> using namespace std; int main() { string a; cin>>a; for(int i = 0;i < 8;i++){ if(a[0] == 'M' && a[1] == 'D' && a[2] == 'A'){ int temp; for (int j = 7;j >= 3;j--){ if ((int)a[j] >= 48 && (int)a[j] <= 57){ temp = (int)a[j] - 48; break; } } switch (temp){ case 1: cout <<"1 0 0 0 0"; break; case 9: cout <<"1 0 0 0 0"; break; case 2: cout <<"0 1 0 0 0"; break; case 8: cout <<"0 1 0 0 0"; break; case 3: cout <<"0 0 1 0 0"; break; case 7: cout <<"0 0 1 0 0"; break; case 4: cout <<"0 0 0 1 0"; break; case 6: cout <<"0 0 0 1 0"; break; case 5: cout <<"0 0 0 0 1"; break; case 0: cout <<"0 0 0 0 1"; break; } break; } else{ cout<<"1 1 1 1 1"; break; } } return 0; }
- 1
信息
- ID
- 2279
- 时间
- 1000ms
- 内存
- 125MiB
- 难度
- 7
- 标签
- 递交数
- 15
- 已通过
- 10
- 上传者