Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
139792 刘星辰liuxingchen 扫雷游戏 C++ 通过 100 1 MS 260 KB 464 2024-03-25 20:47:24

Tests(10/10):


#include<bits/stdc++.h> using namespace std; int n; int m; char c; bool b[110][110]; int main() { cin>>n; cin>>m; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cin>>c; b[i][j]=(c=='*' ? 1 : 0); } } for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { (b[i][j]==1 ? cout<<"*" : cout<<b[i-1][j-1]+b[i-1][j]+b[i-1][j+1]+b[i][j-1]+b[i][j]+b[i][j+1]+b[i+1][j-1]+b[i+1][j]+b[i+1][j+1]); } cout<<endl; } return 0; }


测评信息: