結果
| 問題 | No.2246 1333-like Number |
| コンテスト | |
| ユーザー |
ManjushriMitra
|
| 提出日時 | 2024-08-10 19:06:05 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 769 bytes |
| コンパイル時間 | 2,843 ms |
| コンパイル使用メモリ | 246,876 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-08-10 19:06:12 |
| 合計ジャッジ時間 | 6,324 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 3 WA * 3 RE * 18 |
ソースコード
#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)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
int main(){
int N;
cin >> N;
vector<pair<int,int>> p;
for(int a = 1; a <= 9; ++a){
for(int b = a+1; b <= 9; ++b){
p.push_back({a, b});
}
}
if(N % 36 == 0){
int cnt = N/36;
cout << p.back().first << p.back().second;
rep(i, 0, cnt-1) cout << p.back().second;
cout << endl;
}else{
int i = N % 36 - 1, cnt = N/36;
cout << p[i].first << p[i].second;
rep(i, 0, cnt) cout << p[i].second;
cout << endl;
}
return 0;
}
ManjushriMitra