結果
問題 | No.2246 1333-like Number |
ユーザー | eve__fuyuki |
提出日時 | 2024-04-09 12:01:40 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 2,383 ms |
コンパイル使用メモリ | 204,740 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 17:12:42 |
合計ジャッジ時間 | 3,866 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } vector<string> s; int main() { fast_io(); for (char a = '1'; a < '9'; a++) { for (char b = a + 1; b <= '9'; b++) { s.push_back(string(1, a) + b); } } int n; cin >> n; n--; int d = n / 36; cout << s[n % 36]; for (int i = 0; i < d; i++) { cout << s[n % 36][1]; } cout << endl; }