9. Alice and A simple problem

1574080260

include

int main(){
int m,n;
scanf(“%d”,&m);
scanf(“%d”,&n);
int i;
for(i=1; i<=n*m; i++){
if(i % n == 0){
printf(“%d\n”,i);
}
else printf(“%d “,i);
}
}

Deuchie

真是一道很9的题啊
顺序输出就能过的东西233333

#include <cstdio>

int main() {
    int m, n;
    scanf("%i%i", &m, &n);
    for (int i = 1; i <= m; ++i) {
        printf("%i", (i - 1) * n + 1);
        for (int j = 1; j < n; ++j) {
            printf(" %i", (i - 1) * n + 1 + j);
        }
        putchar('\n');
    }
}
zasleon

include

using namespace std;
int main()
{
long int m,n;
cin>>m;
cin>>n;
int i,j;
int k=10;
for(i=1;i<=m;i++)
{
for(j=1;j<=n-1;j++){cout<<k++<<” “;}
cout<<k++<<endl;
}

}

琪露诺

Cirno and aC number ⑨ problem.

#include <stdio.h>
int main(void)
{
    int m, n, i, j;
    scanf("%d%d",&m,&n);
    for(i=0; i<m; i++)
    {
        for(j=0; j<n-1; j++)
            printf("%d ",i*100+j+1);
        printf("%d\n",i*100+j+1);
    }
    return 0;
}
你当前正在回复 博客/题目
存在问题!