結果

問題 No.2358 xy+yz+zx=N
ユーザー tailstails
提出日時 2023-06-23 22:33:10
言語 cLay
(20240104-1)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 3,493 ms
コンパイル使用メモリ 167,964 KB
実行使用メモリ 6,308 KB
最終ジャッジ日時 2023-09-14 10:13:11
合計ジャッジ時間 5,371 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
4,376 KB
testcase_01 AC 54 ms
4,380 KB
testcase_02 AC 53 ms
4,376 KB
testcase_03 AC 54 ms
4,380 KB
testcase_04 AC 53 ms
4,376 KB
testcase_05 AC 53 ms
4,380 KB
testcase_06 AC 53 ms
4,380 KB
testcase_07 AC 54 ms
4,376 KB
testcase_08 AC 71 ms
6,036 KB
testcase_09 AC 73 ms
6,308 KB
testcase_10 AC 59 ms
4,384 KB
testcase_11 AC 61 ms
4,772 KB
testcase_12 AC 56 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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