結果

問題 No.1658 Product / Sum
ユーザー snrnsidysnrnsidy
提出日時 2021-10-22 21:49:59
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 3,298 ms
コンパイル使用メモリ 200,632 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-24 12:54:32
合計ジャッジ時間 5,980 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,352 KB
testcase_02 AC 11 ms
4,352 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 WA -
testcase_05 AC 7 ms
4,352 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 85 ms
4,352 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n,k;

	cin >> n >> k;

	for(int i=1;i<=10000;i++)
	{
		for(int j=1;j<=10000;j++)
		{
			long long int A = i*j;
			long long int B = i + j + (n-2);
			B*=k;
			if(A==B)
			{
				for(int k=0;k<n-2;k++)
				{
					cout << 1 << ' ';
				}
				cout << i << ' ' << j << '\n';
				return 0;
			}
		}
	}
	return 0;
}
0