文章

2

粉丝

31

获赞

0

访问

279

头像
矩阵位置 题解:
P1543 云南大学机试题
发布于2024年4月3日 11:32
阅读数 124

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	int row;
	int col;
	while(cin >> n){
		if(n%3==0) row = n / 3;
        else row = n / 3 + 1;
		col = n - (row-1) * 3;
		cout << row << " " << col << endl;
	}
	return 0;
}

 
登录查看完整内容


登录后发布评论

暂无评论,来抢沙发