結果

問題 No.1658 Product / Sum
ユーザー snrnsidy
提出日時 2021-10-22 21:49:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 422 bytes
コンパイル時間 1,775 ms
コンパイル使用メモリ 192,384 KB
最終ジャッジ日時 2025-01-25 03:29:10
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 10
権限があれば一括ダウンロードができます

ソースコード

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