結果
問題 | No.2246 1333-like Number |
ユーザー |
![]() |
提出日時 | 2024-04-09 12:01:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 482 bytes |
コンパイル時間 | 2,113 ms |
コンパイル使用メモリ | 197,128 KB |
最終ジャッジ日時 | 2025-02-20 23:19:16 |
ジャッジサーバー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;}