結果
| 問題 |
No.2246 1333-like Number
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2023-03-18 02:19:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 480 bytes |
| コンパイル時間 | 1,910 ms |
| コンパイル使用メモリ | 193,780 KB |
| 最終ジャッジ日時 | 2025-02-11 14:46:30 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
vector<int> A,B;
for(int i=1;i<10;i++){
for(int j=i+1;j<10;j++){
A.push_back(i);
B.push_back(j);
}
}
int k=A.size();
int n;
cin>>n;
n--;
int a=n/k,b=n%k;
cout<<A[b];
rep(i,a+1) cout<<B[b];
cout<<endl;
return 0;
}
umezo