Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
162721 王垚植 画DNA C++ Accepted 44 MS 276 KB 333 2026-10-18 14:59:44

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; for(int y=0;y<n;y++){ if(y>0)cout<<endl; int a,b;cin>>a>>b; int t=b*(a-1)+1; for(int j=0;j<t;j++){ int r=j%(a-1); for(int x=0;x<a;x++){ if(r==x||r+x==a-1)cout<<"X"; else cout<<" "; } cout<<endl; } } return 0; }