結果

問題 No.689 E869120 and Constructing Array 3
ユーザー polylogKpolylogK
提出日時 2018-05-18 23:36:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 1,857 ms
コンパイル使用メモリ 164,616 KB
実行使用メモリ 4,512 KB
最終ジャッジ日時 2023-09-10 23:15:01
合計ジャッジ時間 6,089 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::cin;

int n;

int main(){
	int n; cin >> n;
	
	for(int i = 1; i <= 250; i++){
		if((n + i * i) % i) continue;
		
		int B = (n + i * i) / i - i;
		if(i + B > 250) continue;
		for(int j = 0; j < i; j++) cout << 3 << " ";
		for(int j = 0; j < B; j++) cout << 2 << " ";
		cout << endl;
		return 0;
	}
		
	assert(false);
	return 0;
}
0