結果
| 問題 | 
                            No.2246 1333-like Number
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ManjushriMitra
                         | 
                    
| 提出日時 | 2024-07-27 09:58:58 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 506 bytes | 
| コンパイル時間 | 1,763 ms | 
| コンパイル使用メモリ | 171,440 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-27 09:59:02 | 
| 合計ジャッジ時間 | 3,314 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 22 WA * 2 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,m,n) for(int i=m; i<n; ++i)
#define repl(i,m,n) for(ll i=m; i<n; ++i)
int main(){
    int N;
    cin >> N;
    vector<pair<int,int>> cow;
    for(int a = 1; a <= 9; ++a){
        for(int b = a+1; b <= 9; ++b){
            cow.push_back({a, b});
        }
    }
    int n = cow.size();
    int d = N / n, i = N % n;
    cout << cow[i-1].first;
    rep(j, 0, d+1) cout << cow[i-1].second;
    cout << endl;
    return 0;
}
            
            
            
        
            
ManjushriMitra