結果

問題 No.2358 xy+yz+zx=N
ユーザー tailstails
提出日時 2023-06-23 22:33:10
言語 cLay
(20241019-1)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 4,111 ms
コンパイル使用メモリ 183,928 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 17:39:26
合計ジャッジ時間 4,611 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n;
set<array<int,3>>s;
rep(x,1,3162){
	rep(y,x+1){
		if((n-x*y)%(x+y)==0){
			int z=(n-x*y)/(x+y);
			if(z>=x){
				s.insert({x,y,z});
				s.insert({x,z,y});
				s.insert({y,x,z});
				s.insert({y,z,x});
				s.insert({z,x,y});
				s.insert({z,y,x});
			}
		}
	}
}
wt(int(s.size()));
for(auto a:s){
	wt((a)(3));
}
0