2 条题解
-
1
#include <iostream> #define endl '\n' using namespace std; int main() { string s; cin >> s; for (int j = 1; j <= 5; j++) { for (int i = 0; i < s.size(); i++) { if (s[i] == '0') { if (j == 1 || j == 5) cout << "....."; else cout << ".***."; } else if (s[i] == '1') { cout << "****."; } else if (s[i] == '2') { if (j % 2) cout << "....."; else if (j == 2) cout << "****."; else cout << ".****"; } else { if (j % 2) cout << "....."; else cout << "****."; } } cout << endl; } return 0; }
-
0
#include <bits/stdc++.h> #include <string> using namespace std ; string a[6][6]; int main() { a[0][1] = "....."; a[0][2] = ".***."; a[0][3] = ".***."; a[0][4] = ".***."; a[0][5] = "....."; a[1][1] = "****."; a[1][2] = "****."; a[1][3] = "****."; a[1][4] = "****."; a[1][5] = "****."; a[2][1] = "....."; a[2][2] = "****."; a[2][3] = "....."; a[2][4] = ".****"; a[2][5] = "....."; a[3][1] = "....."; a[3][2] = "****."; a[3][3] = "....."; a[3][4] = "****."; a[3][5] = "....."; string s; cin>>s; for(int i = 1; i <= 5;i++) { for(int j = 0; j < s.size();j++) { int n = s[j] - '0'; cout<<a[n][i]; } cout<<endl; } }
- 1
信息
- ID
- 35277
- 时间
- 1000ms
- 内存
- 512MiB
- 难度
- 2
- 标签
- 递交数
- 13
- 已通过
- 6
- 上传者