文章

49

粉丝

140

获赞

27

访问

16.5k

头像
怎么借书 题解:测试用例结果欺骗我感情
P2004 云南大学机试题
发布于2024年3月6日 13:04
阅读数 181

crying

#include <iostream>
#include <string.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
	int a[10000],count=0;
	int n;
	 cin >>n;
	 for(int i=1;i<=n;i++)
		 a[i]=i;
	 for(int i=1;i<=n;i++){
		 for(int j=1;j<=n;j++){
			 if(i!=j){
			 for(int z=1;z<=n;z++){
                         if(i!=z&&j!=z){

							 cout <<"A:"<<i<<' '<<"B:"<<j<<' '<<"C:"<<z<<' '<<endl;
							 count ++;
						 }
	 }
			 }
		 }
	 }
	 cout << count <<endl;
//system("pause");
return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发