主页
搜索
最近更新
数据统计
赞助我们
申请密钥
系统公告
1
/
1
请查看完所有公告
B4067 [GESP202412 三级] 打印数字 题解
最后更新于 2025-04-14 21:52:47
作者
Cy_candy
分类
题解
复制 Markdown
查看原文
删除文章
更新内容
```cpp #include<bits/stdc++.h> using namespace std; string s0[5]={ ".....", ".***.", ".***.", ".***.", "....." }; string s1[5]={ "****.", "****.", "****.", "****.", "****." }; string s2[5]={ ".....", "****.", ".....", ".****", "....." }; string s3[5]={ ".....", "****.", ".....", "****.", "....." }; string s, ans[5]; int main(){ cin >> s; for(int i = 0; i < s.size(); i++) { for(int j = 0; j < 5; j++) { switch(s[i]) { case '0': ans[j] += s0[j]; break; case '1': ans[j] += s1[j]; break; case '2': ans[j] += s2[j]; break; case '3': ans[j] += s3[j]; break; } } } for(int i = 0; i < 5; i++) cout << ans[i] << "\n"; return 0; } ```
正在渲染内容...
点赞
0
收藏
0