結果
問題 |
No.2246 1333-like Number
|
ユーザー |
![]() |
提出日時 | 2023-03-23 14:37:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 1,752 ms |
コンパイル使用メモリ | 170,680 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-18 15:29:23 |
合計ジャッジ時間 | 2,272 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#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 - 1) / 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; }