結果

問題 No.2246 1333-like Number
ユーザー potoooooooo
提出日時 2023-03-21 23:38:16
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 447 bytes
コンパイル時間 1,657 ms
コンパイル使用メモリ 192,604 KB
最終ジャッジ日時 2025-02-11 15:56:54
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int N; cin >> N; N--;
    int M = 36;
    int l = N / 36;
    int r = N % 36;
    for (int a = 1; a < 9; a++) {
        for (int b = a + 1; b < 10; b++) {
            if (r-- == 0) {
                cout << string(1, a + '0') + string(l + 1, b + '0') << "\n";
                break;
            }
        }
    }
    return 0;
}
0