結果

問題 No.2246 1333-like Number
ユーザー forest3
提出日時 2023-03-23 14:26:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 1,691 ms
コンパイル使用メモリ 169,664 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-18 15:28:47
合計ジャッジ時間 2,649 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
	int N;
	cin >> N;
	vector<int> v;
	for( int i = 1; i < 10; i++ ) {
		for( int j = i + 1; j < 10; j++ ) v.push_back( i * 10 + j );
	}
	int sz = v.size();
	int d = N / sz;
	int m = (N - 1) % sz;
	string ans = to_string( v[m] );
	char c = ans.back();
	for( int i = 0; i < d; i++ ) ans += c;

	cout << ans << endl;
}
0