violette17   1주 전

#include <iostream>
#include <cmath>
using namespace std;

int main() {
int n,m;
scanf("%d",&n);
scanf("%d",&m);
int a[n][m];
for (int i=0; i<n; i++)
{
for (int j=0; j<m; j++)
{
a[i][j]=0;
}
}


for (int i=0; i<n; i++)
{
int k=0;

scanf("%d",&k);
for (int j=0; j<m; j++)
{
int dumy=(k/(int)pow((double)10,(double)(m-j-1)))%10;
a[i][j]=dumy;

}
}


for (int i=0; i<n; i++)
{
for (int j=0; j<m; j++)
{
cout<<a[i][j]<<" ";
}
cout<<endl;
}
return 0;
}

댓글을 작성하려면 로그인해야 합니다.