結果

問題 No.2246 1333-like Number
ユーザー forest3forest3
提出日時 2023-03-23 14:09:35
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 323 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 173,880 KB
実行使用メモリ 6,908 KB
最終ジャッジ日時 2023-10-18 19:32:23
合計ジャッジ時間 5,921 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 TLE -
testcase_05 AC 1,093 ms
5,848 KB
testcase_06 AC 1,493 ms
6,096 KB
testcase_07 AC 1,840 ms
6,356 KB
testcase_08 AC 170 ms
4,728 KB
testcase_09 AC 1,174 ms
5,872 KB
testcase_10 AC 148 ms
4,640 KB
testcase_11 AC 927 ms
5,688 KB
testcase_12 AC 22 ms
4,348 KB
testcase_13 AC 89 ms
4,596 KB
testcase_14 AC 242 ms
4,860 KB
testcase_15 AC 229 ms
4,856 KB
testcase_16 AC 613 ms
5,448 KB
testcase_17 AC 1,855 ms
6,324 KB
testcase_18 AC 73 ms
4,544 KB
testcase_19 AC 132 ms
4,728 KB
testcase_20 TLE -
testcase_21 AC 1,441 ms
6,064 KB
testcase_22 AC 732 ms
5,516 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 AC 2 ms
4,348 KB
testcase_26 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int N;
	cin >> N;
	queue<string> q;
	for( int i = 1; i < 10; i++ ) {
		for( int j = i + 1; j < 10; j++ ) q.push( to_string(i * 10 + j) );
	}
	string ans;
	while( N ) {
		ans = q.front();
		q.pop();
		q.push( ans + ans.back() );
		N--;
	}
	cout << ans << endl;
}
0