結果
| 問題 |
No.2246 1333-like Number
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-17 22:09:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 788 bytes |
| コンパイル時間 | 3,329 ms |
| コンパイル使用メモリ | 158,944 KB |
| 最終ジャッジ日時 | 2025-02-11 13:17:03 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <cstring>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < int(n);i++)
int main(){
int n;
cin >> n;
n--;
int x = n/36;
int y = n%36;
string ans;
int a = 0;
int b = 0;
int cnt = 0;
for (int i = 1; i <= 9;i++){
for (int j = 1; j <= 9;j++){
if (i >= j) continue;
if (cnt == y){
ans = to_string(10*i+j);
a = i;
b = j;
}
//cout << 10*i+j << endl;
cnt++;
}
}
for (int i = 0; i < x;i++){
ans += to_string(b);
}
cout << ans << endl;
return 0;
}