buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
n = int(input()) e_str = [chr(ord('a') + i) for i in range(26)] ans = [] while n>0: i = n % 26 ans.append(e_str[i-1]) n = n// 26 # print(e_str) # print(ans) ans.reverse() a = ''.join(ans) print(a)
n = int(input()) e_str = [chr(ord('a') + i) for i in range(26)] ans = [] while n>0: n -= 1 i = n % 26 # print(i) ans.append(e_str[i]) n = n// 26 # print(n) # print(e_str) # print(ans) ans.reverse() a = ''.join(ans) print(a)
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]]
5
80
n = int(input())-1 x = 26 d = 1 while n > x: n -= x d += 1 x *= 26 ans = "" al = list("abcdefghijklmnopqrstuvwxyz") tmp = pow(26,d) for i in range(d-1,-1,-1): tmp //= 26 ans += al[n//tmp] n %= tmp print(ans)
n = int(input())-1 x = 26 d = 1 while n >= x: n -= x d += 1 x *= 26 ans = "" al = list("abcdefghijklmnopqrstuvwxyz") tmp = pow(26,d) for i in range(d-1,-1,-1): tmp //= 26 ans += al[n//tmp] n %= tmp print(ans)
[["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20]]
5
84
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define pb push_back const int maxn = 10000; const int INF32 = 1'050'000'000; const long long INF64 = 4'000'000'000'000'000'000; const int MOD7 = 1'000'000'007; const int MOD9 = 1'000'000'009; const int m...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define pb push_back const int maxn = 10000; const int INF32 = 1'050'000'000; const long long INF64 = 4'000'000'000'000'000'000; const int MOD7 = 1'000'000'007; const int MOD9 = 1'000'000'009; const int m...
[["+", 0, 57, 75, 76, 0, 1, 0, 34, 0, 21], ["+", 75, 76, 0, 1, 0, 34, 12, 27, 28, 22], ["+", 75, 76, 0, 1, 0, 34, 12, 27, 17, 68], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19]]
1
286
a=int(input()) b='' while a>0: c=a%26 if c==0: b=b+'z' a=a-26 elif c==1: b=b+'a' a=a-1 elif c==2: b=b+'b' a=a-2 elif c==3: b=b+'c' a=a-3 elif c==4: b=b+'d' a=a-4 elif c==5: b=b+'e' a=a-5 elif c==6: b=b+'f' a=a-6 elif c==7: b=b+'g' a=a-7 ...
a=int(input()) b='' while a>0: c=a%26 if c==0: b=b+'z' a=a-26 elif c==1: b=b+'a' a=a-1 elif c==2: b=b+'b' a=a-2 elif c==3: b=b+'c' a=a-3 elif c==4: b=b+'d' a=a-4 elif c==5: b=b+'e' a=a-5 elif c==6: b=b+'f' a=a-6 elif c==7: b=b+'g' a=a-7 ...
[["+", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 0, 652, 3, 4, 0, 206, 206, 663, 0, 102], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 3, 4, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73]]
5
473
#include <bits/stdc++.h> using namespace std; #define ll long long #define ub upper_bound #define int long long #define vbe(sdk) sdk.begin(), sdk.end() #define pb push_back #define loop(i, a, b) for (int i = a; i < b; ++i) #define rloop(i, a, b) for (int i = a; i >= b; --i) #define mp make_pair #define mod 1000000007 #...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ub upper_bound #define int long long #define vbe(sdk) sdk.begin(), sdk.end() #define pb push_back #define loop(i, a, b) for (int i = a; i < b; ++i) #define rloop(i, a, b) for (int i = a; i >= b; --i) #define mp make_pair #define mod 1000000007 #...
[["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
246
#include <bits/stdc++.h> using namespace std; #define int long long #define mem(v, val) memset(v, val, sizeof val) #define endl '\n' int big = 1000000000000010; vector<int> v; int n; void rec(string &s, int level, int val) { if (level == 1) { val = (val - 1 + 26) % 26; s += 'a' + val; return; } ...
#include <bits/stdc++.h> using namespace std; #define int long long #define mem(v, val) memset(v, val, sizeof val) #define endl '\n' int big = 1000000000000010; vector<int> v; int n; void rec(string &s, int level, int val) { if (level == 1) { val = (val - 1 + 26) % 26; s += 'a' + val; return; } ...
[["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]]
1
252
#include <algorithm> #include <iostream> using namespace std; #define ll long long int int main() { ll n; cin >> n; string ans = ""; while (n > 0) { ll x = n % 26; char ch; if (x == 0) { ch = 'z'; } else { ch = 'a' + x - 1; } ans = ch + ans; n = n / 26; } cout << ans;...
#include <algorithm> #include <iostream> using namespace std; #define ll long long int int main() { ll n; cin >> n; string ans = ""; while (n > 0) { ll x = n % 26; char ch; if (x == 0) { ch = 'z'; } else { ch = 'a' + x - 1; } ans = ch + ans; n = (n - 1) / 26; } cout <...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
91
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } string dfs(int n, int cnt) { if ...
#include <bits/stdc++.h> using namespace std; #define int long long template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } string dfs(int n, int cnt) { if ...
[["-", 0, 14, 8, 9, 0, 37, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 12, 22]]
1
213
n = int(input()) alp = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] name = '' while(True): m = n%26 if(m == 0): m = 26 name = alp[m-1] + name n = n//26 if(n==0): break print(name)
n = int(input()) alp = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] name = '' while(True): m = n%26 if(m == 0): m = 26 n -= 26 name = alp[m-1] + name n = n//26 if(n==0): break print(name)
[["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
166
#include <algorithm> #include <functional> #include <iostream> #include <string> using namespace std; #include <iomanip> #include <math.h> #include <queue> #include <vector> using Graph = vector<vector<int>>; const double PI = 3.14159265358979323846; long long modpow(long long a, long long n, long long mod) { long ...
#include <algorithm> #include <functional> #include <iostream> #include <string> using namespace std; #include <iomanip> #include <math.h> #include <queue> #include <vector> using Graph = vector<vector<int>>; const double PI = 3.14159265358979323846; long long modpow(long long a, long long n, long long mod) { long ...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
264
n = int(input()) l = [chr(ord('a') + i) for i in range(26)] l = [l.pop()] + l print(l) k = [] while n > 0: y = n % 26 k.append(l[y]) n -= 1 n //= 26 print(''.join(reversed(k)))
n = int(input()) l = [chr(ord('a') + i) for i in range(26)] l = [l.pop()] + l k = [] while n > 0: y = n % 26 k.append(l[y]) n -= 1 n //= 26 print(''.join(reversed(k)))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
87
n = int(input()) l = [] while(n > 0): l.append((n - 1) % 26) n = int((n - 1) / 26) print(l) l.reverse() ans = [] for i in l: ans.append(chr(i + ord('a'))) print(''.join(ans))
n = int(input()) l = [] while(n > 0): l.append((n - 1) % 26) n = int((n - 1) / 26) l.reverse() ans = [] for i in l: ans.append(chr(i + ord('a'))) print(''.join(ans))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
87
#include <bits/stdc++.h> using namespace std; using ll = long long; const int maxn = 1e5 + 5; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int tc = 1; // cin >> tc; while (tc--) { ll n; cin >> n; string res = ""; while (n) { int d = n % 26 - 1; ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const int maxn = 1e5 + 5; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int tc = 1; // cin >> tc; while (tc--) { ll n; cin >> n; string res = ""; while (n) { n--; int d = n % 2...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
141
#include <bits/stdc++.h> #define int long long #define INT_MAX INT64_MAX #define INT_MIN INT64_MIN #define PI 3.14159265358979323846 #define CLK clock_t clk = clock(); // Start of main #define OCLK \ cerr << "Time (in ms): " ...
#include <bits/stdc++.h> #define int long long #define INT_MAX INT64_MAX #define INT_MIN INT64_MIN #define PI 3.14159265358979323846 #define CLK clock_t clk = clock(); // Start of main #define OCLK \ cerr << "Time (in ms): " ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
1
471
def num2alpha(num): if num<=26: return chr(96+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(96+num%26) n=int(input()) print(num2alpha(n))
def num2alpha(num): if num<=26: return chr(96+num) elif num%26==0: return num2alpha(num//26-1)+chr(122) else: return num2alpha(num//26)+chr(96+num%26) n=int(input()) print(num2alpha(n))
[["-", 0, 37, 0, 657, 12, 652, 3, 4, 0, 612], ["+", 0, 37, 0, 657, 12, 652, 3, 4, 0, 612]]
5
72
#include <bits/stdc++.h> int main() { long long n; std::cin >> n; std::string name = ""; while (n) { name += 'a' + n % 26 - 1; n /= 26; } std::reverse(name.begin(), name.end()); std::cout << name << std::endl; }
#include <bits/stdc++.h> int main() { long long n; std::cin >> n; std::string name = ""; while (n-- > 0) { name += 'a' + n % 26; n /= 26; } std::reverse(name.begin(), name.end()); std::cout << name << std::endl; }
[["+", 0, 52, 15, 339, 51, 16, 31, 27, 17, 68], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
75
#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; typedef unsigned long long ull; typedef long long ll; typedef double dd; const int N = 1e5 + 5; const dd eps = 1e-8; const int mod = 1e9 + 7; string ans; ll n; int main() { ios::sync_with_stdio(false); // freopen("input.txt","r",stdin); cin >> n...
#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; typedef unsigned long long ull; typedef long long ll; typedef double dd; const int N = 1e5 + 5; const dd eps = 1e-8; const int mod = 1e9 + 7; string ans; ll n; int main() { ios::sync_with_stdio(false); // freopen("input.txt","r",stdin); cin >> n...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]]
1
119
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, p, a; char s; string q; cin >> n; while (true) { if (n <= 0) break; s = 'a'; a = n % 26; if (a == 0) a = 26; a--; s += a; n = n / 26; q += s; } for (int i = q.size() - 1; ...
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, p, a; char s; string q; cin >> n; while (true) { if (n <= 0) break; s = 'a'; a = n % 26; if (a == 0) a = 26; a--; s += a; n = (n - 1) / 26; q += s; } for (int i = q.size()...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
120
def func(n): if n<=26: return chr(n+96) if n%26==0: return func(n//26)+'z' return func(n//26)+chr(n%26+96) n=int(input()) print(func(n))
def func(n): if n<=26: return chr(n+96) if n%26==0: return func(n//26-1)+'z' return func(n//26)+chr(n%26+96) n=int(input()) print(func(n))
[["+", 0, 657, 31, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 657, 31, 652, 3, 4, 0, 657, 12, 612]]
5
67
n = $stdin.gets.chomp.to_i alp = "abcdefghijklmnopqrstuvwz".split('') ans = "" while true do kotae = n.divmod(26) #商,あまりの順 if kotae[1] == 0 kotae[0] -= 1 ans = "z" + ans else ans = alp[kotae[1] -1] + ans end if kotae[0] == 0 break end n = kotae[0] end puts ans
n = $stdin.gets.chomp.to_i alp = "abcdefghijklmnopqrstuvwxyz".split('') ans = "" while true do kotae = n.divmod(26) #商,あまりの順 if kotae[1] == 0 kotae[0] -= 1 ans = "z" + ans else ans = alp[kotae[1]-1] + ans end if kotae[0] == 0 break end n = kotae[0] end puts ans
[["-", 0, 493, 0, 662, 12, 652, 486, 557, 0, 6], ["+", 0, 493, 0, 662, 12, 652, 486, 557, 0, 6]]
4
89
n = gets.to_i s = "" r = [*"a".."z"] while n > 0 s = r[n % 26 - 1] + s n = n / 26 end puts s
n = gets.to_i s = "" r = [*"a".."z"] while n > 0 n -= 1 s = r[n % 26] + s n = n / 26 end puts s
[["+", 0, 493, 0, 89, 8, 170, 0, 755, 31, 22], ["+", 0, 493, 0, 89, 8, 170, 0, 755, 17, 110], ["+", 0, 493, 0, 89, 8, 170, 0, 755, 12, 612], ["-", 0, 662, 12, 738, 31, 742, 0, 738, 17, 33], ["-", 0, 662, 12, 738, 31, 742, 0, 738, 12, 612]]
4
45
// Problem : C - One Quadrillion and One Dalmatians // Contest : AtCoder - AtCoder Beginner Contest 171 // URL : https://atcoder.jp/contests/abc171/tasks/abc171_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) //#pragma GCC optimize "trapv"// WA to RE...
// Problem : C - One Quadrillion and One Dalmatians // Contest : AtCoder - AtCoder Beginner Contest 171 // URL : https://atcoder.jp/contests/abc171/tasks/abc171_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) //#pragma GCC optimize "trapv"// WA to RE...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13]]
1
243
n=int(input()) a=[] while n>0: b=n%26 if b==0: b=26 t=1 c=lambda b:chr(b+64) a.append(c(b)) n//=26 if t==1: n-=1 t=0 d=len(a) e=[] for i in range(d): e.append(a[-1-i]) ans=''.join(e) ans=ans.lower() print(ans)
n=int(input()) a=[] t=0 while n>0: b=n%26 if b==0: b=26 t=1 c=lambda b:chr(b+64) a.append(c(b)) n//=26 if t==1: n-=1 t=0 d=len(a) e=[] for i in range(d): e.append(a[-1-i]) ans=''.join(e) ans=ans.lower() print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
117
#include <bits/stdc++.h> using namespace std; typedef long long ll; //#define P pair<ll,ll> #define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I) #define FORR(I, A, B) for (ll I = ll((B)-1); I >= ll(A); --I) #define TO(x, t, f) ((x) ? (t) : (f)) #define SORT(x) (sort(x.begin(), x.end())) // 0 2 2 3 4 5 8 9 #define PO...
#include <bits/stdc++.h> using namespace std; typedef long long ll; //#define P pair<ll,ll> #define FOR(I, A, B) for (ll I = ll(A); I < ll(B); ++I) #define FORR(I, A, B) for (ll I = ll((B)-1); I >= ll(A); --I) #define TO(x, t, f) ((x) ? (t) : (f)) #define SORT(x) (sort(x.begin(), x.end())) // 0 2 2 3 4 5 8 9 #define PO...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
298
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define faster \ ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr) #define ll long...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define faster \ ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr) #define ll long...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
509
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, n, k; cin >> n; string t = ""; while (n > 0) { k = n % 26 - 1; if (k == -1) t += 'z'; else t += ('a' + k); n /= 26; } reverse(t.begin(), t.end()); cout << t; }
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, n, k; cin >> n; string t = ""; while (n > 0) { k = n % 26 - 1; if (k == -1) { t += 'z'; n--; } else t += ('a' + k); n /= 26; } reverse(t.begin(), t.end()); cout << t; }
[["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]]
1
94
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; string ans = ""; while (n) { int k = n % 26; if (!k) ans += 'z'; else ans += char(k + 96); n = n / 26; } reverse(ans.begin(), ans.end()); cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; string ans = ""; while (n) { int k = n % 26; if (!k) { ans += 'z'; n--; } else ans += char(k + 96); n = n / 26; } reverse(ans.begin(), ans.end()); cout << ans; return 0; }
[["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]]
1
92
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <assert.h> #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <climits> #include <complex> // complex #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include...
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <assert.h> #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <climits> #include <complex> // complex #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
329
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll a[1000]; char s[1000]; int main(void) { ll n; cin >> n; ll m = n; a[0] = 1; for (int i = 1; i <= 13; i++) { a[i] = a[i - 1] * 26; } int i = 1; while (n > 0) { n -= a[i]; i++; } n += a[i - 1]; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; ll a[1000]; char s[1000]; int main(void) { ll n; cin >> n; ll m = n; a[0] = 1; for (int i = 1; i <= 13; i++) { a[i] = a[i - 1] * 26; } int i = 1; while (n > 0) { n -= a[i]; i++; } n += a[i - 1]; ...
[["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22]]
1
205
#include <algorithm> #include <iostream> #include <vector> using namespace std; using ull = unsigned long long; int main() { ull n; string ret = ""; cin >> n; while (n != 0) { string s = string(1, 'a' + (n % 26) - 1); ret = s + ret; n = n / 26; } cout << ret; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; using ull = unsigned long long; int main() { ull n; string ret = ""; cin >> n; while (n != 0) { n--; string s = string(1, 'a' + (n % 26)); ret = s + ret; n = n / 26; } cout << ret; return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]]
1
83
#include <bits/stdc++.h> using namespace std; #define ll long long using P = pair<ll, ll>; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define PI acos(-1) #define fast_io \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; #define ll long long using P = pair<ll, ll>; #define rep(i, n) for (int i = 0; i < (int)n; i++) #define PI acos(-1) #define fast_io \ ios_base::sync_with_stdio(false); ...
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
143
N=int(input()) asci = 'abcdefghijklmnopqrstuvwxyz' ans=[] temp=N while temp!=0: ans.append(asci[temp%26-1]) temp=temp//26 ans.reverse() print(''.join(ans))
N=int(input()) asci = 'abcdefghijklmnopqrstuvwxyz' ans=[] temp=N while temp!=0: temp-=1 ans.append(asci[temp%26]) temp=temp//26 ans.reverse() print(''.join(ans))
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]]
5
58
#include <bits/stdc++.h> using namespace std; signed main() { unsigned long long int N; cin >> N; vector<char> B(100); vector<char> A(26); int count = 0; A[1] = 'a'; A[2] = 'b'; A[3] = 'c'; A[4] = 'd'; A[5] = 'e'; A[6] = 'f'; A[7] = 'g'; A[8] = 'h'; A[9] = 'i'; A[10] = 'j'; A[11] = 'k';...
#include <bits/stdc++.h> using namespace std; signed main() { unsigned long long int N; cin >> N; vector<char> B(100); vector<char> A(26); int count = 0; A[1] = 'a'; A[2] = 'b'; A[3] = 'c'; A[4] = 'd'; A[5] = 'e'; A[6] = 'f'; A[7] = 'g'; A[8] = 'h'; A[9] = 'i'; A[10] = 'j'; A[11] = 'k';...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79]]
1
382
#include <bits/stdc++.h> using namespace std; int main(int argc, const char *argv[]) { long long n; cin >> n; string ans; while (n > 0) { long long d = n % 26; n /= 26; if (d == 0) { ans += 'z'; } else { ans += 'a' + (d - 1); } } reverse(ans.begin(), ans.end()); cout <<...
#include <bits/stdc++.h> using namespace std; int main(int argc, const char *argv[]) { long long n; cin >> n; string ans; while (n > 0) { long long d = n % 26; n--; n /= 26; if (d == 0) { ans += 'z'; } else { ans += 'a' + (d - 1); } } reverse(ans.begin(), ans.end()); ...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
107
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { char alpha[] = {'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 'u', 'v', 'w', 'x', 'y'}; ll n; cin >> n; string str; while (n != 0) { ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { char alpha[] = {'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y'}; ll n; cin >> n; string str = ""; while (n !=...
[["+", 0, 43, 49, 50, 51, 83, 0, 103, 0, 125], ["+", 0, 43, 49, 50, 51, 83, 0, 103, 0, 104], ["+", 8, 9, 0, 43, 49, 50, 51, 83, 0, 21], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 62]]
1
182
base = ord('a') - 1 N = int(input()) data = [] while N: next, mod = divmod(N, 26) data.append(mod) N = next data.reverse() for i in data: print(chr(base + i), end="")
base = ord('a') N = int(input()) data = [] while N: next, mod = divmod(N - 1, 26) data.append(mod) N = next data.reverse() for i in data: print(chr(base + i), end="")
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]]
5
68
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (n); i++) #define debug(v) \ cout << #v << ":"; \ for (auto x : v) { ...
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (n); i++) #define debug(v) \ cout << #v << ":"; \ for (auto x : v) { ...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
225
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; vector<ll> ans; while (n > 0) { ans.push_back(n % 26); n -= n % 26; n /= 26; } for (int i = 0; i < n - 1; i++) { if (ans.at(i) <= 0) { ans.at(i) += 26; ans.at(i + 1) -= 1; } } ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin >> n; vector<ll> ans; while (n > 0) { ans.push_back(n % 26); n -= n % 26; n /= 26; } for (int i = 0; i < ans.size() - 1; i++) { if (ans.at(i) <= 0) { ans.at(i) += 26; ans.at(i + 1) -= 1; ...
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 15, 16, 12, 16, 31, 2, 63, 118, 28, 22], ["+", 15, 16, 12, 16, 31, 2, 63, 118, 17, 131], ["+", 15, 16, 12, 16, 31, 2, 63, 118, 119, 120], ["+", 15, 16, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 15, 16, 12, 16, 31, 2, 3, 4, 0, 25]]
1
180
ii = lambda : int(input()) mi = lambda : map(int,input().split()) li = lambda : list(map(int,input().split())) n = ii() al = [1] nc = 0 def ntow(x): if x == 0: return 'z' v = chr(ord('a')+x-1) # print(x,v) return v for i in range(1,15): nc += 26 ** i al.append(nc+1) if nc > 10000...
ii = lambda : int(input()) mi = lambda : map(int,input().split()) li = lambda : list(map(int,input().split())) n = ii() al = [1] nc = 0 def ntow(x): if x == 0: return 'z' v = chr(ord('a')+x-1) # print(x,v) return v for i in range(1,15): nc += 26 ** i al.append(nc+1) if nc > 10000...
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18]]
5
208
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define fori(a, b) for (int i = a; i < b; i++) #define ford(b, a) for (int i = b; i >= a; i--) typedef pair<int, int> pi; #define PI 3.14159265359 // long long mod=1000000007; // int count=INT_MAX; struct hash_pair { template <c...
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define fori(a, b) for (int i = a; i < b; i++) #define ford(b, a) for (int i = b; i >= a; i--) typedef pair<int, int> pi; #define PI 3.14159265359 // long long mod=1000000007; // int count=INT_MAX; struct hash_pair { template <c...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]]
1
303
a = int(input()) - 1 counter = 1 sum_num = 26 ** counter before_sum_num = 0 while True: if a <= sum_num: a -= before_sum_num for i in range(counter, 0, -1): z = a // (26 ** (i - 1)) a = a % (26 ** (i-1)) print(chr(ord('a') + z), end='') break else: before_sum_num = sum_num ...
a = int(input()) counter = 1 sum_num = 26 ** counter before_sum_num = 0 while True: if a <= sum_num: a -= before_sum_num a -= 1 for i in range(counter, 0, -1): z = a // (26 ** (i - 1)) a = a % (26 ** (i-1)) print(chr(ord('a') + z), end='') break else: before_sum_num = sum_n...
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
107
#include <bits/stdc++.h> using namespace std; void solve() { long long n; cin >> n; string s = ""; for (int i = 0; i < 50; i++) { if (n <= 0) { break; } int d; if (n % 26 != 0) { d = n % 26 - 1; } else { d = 25; } char c = 'a' + d; s += c; n = n / 26; } ...
#include <bits/stdc++.h> using namespace std; void solve() { long long n; cin >> n; string s = ""; for (int i = 0; i < 50; i++) { if (n <= 0) { break; } int d; if (n % 26 != 0) { d = n % 26 - 1; } else { d = 25; } char c = 'a' + d; s += c; n = (n - 1) / 26;...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
145
import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) INF = 1000000000000 n = I() s = "abcdefghijklmnopqrstuvwxyz" val = [-1]*100 i ...
import sys def S(): return sys.stdin.readline().rstrip() def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LS(): return list(sys.stdin.readline().rstrip().split()) INF = 1000000000000 n = I() s = "abcdefghijklmnopqrstuvwxyz" val = [-1]*100 i ...
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
219
#include <bits/stdc++.h> #include <iostream> using namespace std; #define debug(x) cout << '>' << #x << ':' << x << endl; #define loop0(i, n) for (int i = 0; i < (n); i++) #define loop1(i, n) for (int i = 1; i <= (n); i++) #define fori(a, b, i) for (int i = (a); i <= (b); i++) #define ford(a, b, i) for (int i = (a); i...
#include <bits/stdc++.h> #include <iostream> using namespace std; #define debug(x) cout << '>' << #x << ':' << x << endl; #define loop0(i, n) for (int i = 0; i < (n); i++) #define loop1(i, n) for (int i = 1; i <= (n); i++) #define fori(a, b, i) for (int i = (a); i <= (b); i++) #define ford(a, b, i) for (int i = (a); i...
[["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
243
// abc171_c #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include...
// abc171_c #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <fstream> #include <functional> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 49, 50, 51, 69, 341, 342, 0, 16, 17, 33], ["-", 49, 50, 51, 69, 341, 342, 0, 16, 12, 13]]
1
369
N = int(input()) ans = [] while N != 0: k = N % 26 if k == 0: k += 26 ans.append(chr(96 + k)) N -= k N //= 26 print(''.join(ans))
N = int(input()) ans = [] while N != 0: k = N % 26 if k == 0: k += 26 ans.append(chr(96 + k)) N -= k N //= 26 ans.reverse() print(''.join(ans))
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
57
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MOD = 1e9 + 7; const ll INF = 1e18; #define rep(i, m, n) for (ll i = (m); i <= (n); i++) #define zep(i, m, n) for (ll i = (m); i < (n); i++) #define rrep(i, m, n) for (ll i = (m); i >= (n); i--) #define print(x) cout <<...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MOD = 1e9 + 7; const ll INF = 1e18; #define rep(i, m, n) for (ll i = (m); i <= (n); i++) #define zep(i, m, n) for (ll i = (m); i < (n); i++) #define rrep(i, m, n) for (ll i = (m); i >= (n); i--) #define print(x) cout <<...
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
155
#include <bits/stdc++.h> using namespace std; typedef int_fast32_t int32; typedef int_fast64_t int64; const int32 inf = 1e9 + 7; const int32 MOD = 1000000007; const int64 llinf = 1e18; #define YES(n) cout << ((n) ? "YES\n" : "NO\n") #define Yes(n) cout << ((n) ? "Yes\n" : "No\n") #define POSSIBLE(n) cout << ((n) ? "...
#include <bits/stdc++.h> using namespace std; typedef int_fast32_t int32; typedef int_fast64_t int64; const int32 inf = 1e9 + 7; const int32 MOD = 1000000007; const int64 llinf = 1e18; #define YES(n) cout << ((n) ? "YES\n" : "NO\n") #define Yes(n) cout << ((n) ? "Yes\n" : "No\n") #define POSSIBLE(n) cout << ((n) ? "...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]]
1
273
n = int(input()) s = [] while n > 0: s.append(chr((n-1) % 26 + 97)) n = n // 26 print(''.join(list(reversed(s))))
n = int(input()) s = [] while n > 0: s.append(chr((n-1) % 26 + 97)) n = (n-1) // 26 print(''.join(list(reversed(s))))
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
55
n = int(input()) ans = "" lis = [] while n>0: lis.append(chr(97+n%26-1)) n //= 26 for i in range(len(lis)): ans += lis[len(lis)-i-1] print(ans)
n = int(input()) ans = "" lis = [] while n>0: n-=1 lis.append(chr(97+n%26)) n //= 26 for i in range(len(lis)): ans += lis[len(lis)-i-1] print(ans)
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]]
5
67
#include <iostream> using namespace std; long long pow26(int n) { long long result = 1; for (int i = 0; i < n; i++) { result *= 26; } return result; } long long sumofpow26(int n) { long long result = 0; for (int i = 0; i < n; i++) { result += pow26(i + 1); } return result; } int main() { long ...
#include <iostream> using namespace std; long long pow26(int n) { long long result = 1; for (int i = 0; i < n; i++) { result *= 26; } return result; } long long sumofpow26(int n) { long long result = 0; for (int i = 0; i < n; i++) { result += pow26(i + 1); } return result; } int main() { long ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 24], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 21], ["+", 0, 43, 49, 50, 51, 4, 0, 103, 0, 104], ["+", 0, 43, 49, 50, 5...
1
203
N = int(input()) Alphabet = "abcdefghijklmnopqrstuvwxyz" ans = "" while N: ind = N%26 ans = Alphabet[ind] + ans N = N//26 print(ans)
N = int(input()) Alphabet = "abcdefghijklmnopqrstuvwxyz" ans = "" while N: N -= 1 ind = N%26 ans = Alphabet[ind] + ans N = N//26 print(ans)
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612]]
5
42
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; #define all(v) v.begin(), v.end() const ll mod = 1000000007; ll countBits(ll in) { int res = 0; for (; in > 0; in >>= 1) { if ((in & 0x01) != 0) { res++; } } return res;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> P; #define all(v) v.begin(), v.end() const ll mod = 1000000007; ll countBits(ll in) { int res = 0; for (; in > 0; in >>= 1) { if ((in & 0x01) != 0) { res++; } } return res;...
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
584
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr long long MOD = 1000000007; constexpr long long INF = 1LL << 60; const long double PI = acosl(-1.0); constexpr long double EPS = 1e-11; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return ...
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr long long MOD = 1000000007; constexpr long long INF = 1LL << 60; const long double PI = acosl(-1.0); constexpr long double EPS = 1e-11; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return ...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 11, 12, 23, 0, 16, 31, 16, 17, 33], ["-", 0, 11, 12, 23, 0, 16, 31, 16, 12, 13]]
1
185
n = int(input()) cp = 26 pcp = 1 cl = 1 while n > cp: pcp = cp cl += 1 cp += 26**cl n -= pcp + 1 cp = 1 ans = '' for i in range(cl): t = (n % (cp * 26) - n % cp) // cp t = max(t, 0) ans = chr(t + 97) + ans n -= t*cp cp *= 26 print(ans)
n = int(input()) cp = 26 pcp = 0 cl = 1 while n > cp: pcp = cp cl += 1 cp += 26**cl n -= pcp + 1 cp = 1 ans = '' for i in range(cl): t = (n % (cp * 26) - n % cp) // cp t = max(t, 0) ans = chr(t + 97) + ans n -= t*cp cp *= 26 print(ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
100
n = int(input()) ans = [] keta = n//26 while n != 0 and n != 1: i = n%26 if i == 0: o = 'z' n = n//26 -1 else: o = chr(n%26 +96) n //= 26 ans.append(o) ans = reversed(ans) print(''.join(ans))
n = int(input()) ans = [] keta = n//26 while n != 0: i = n%26 if i == 0: o = 'z' n = n//26 -1 else: o = chr(n%26 +96) n //= 26 ans.append(o) ans = reversed(ans) print(''.join(ans))
[["-", 36, 36, 0, 656, 0, 52, 15, 679, 17, 355], ["-", 0, 656, 0, 52, 15, 679, 12, 666, 0, 22], ["-", 0, 656, 0, 52, 15, 679, 12, 666, 667, 79], ["-", 0, 656, 0, 52, 15, 679, 12, 666, 0, 612]]
5
85
#include <iostream> using namespace std; long long int pow(long long int x, long long int y) { long long int result = 1; for (long long int i = 0; i < y; ++i) { result *= x; } return result; } int main() { long long int n; cin >> n; int l = 0; for (long long int i = 1, v = 1, u = 26; u <= 10000...
#include <iostream> using namespace std; long long int pow(long long int x, long long int y) { long long int result = 1; for (long long int i = 0; i < y; ++i) { result *= x; } return result; } int main() { long long int n; cin >> n; int l = 0; for (long long int i = 1, v = 0, u = 26; i <= 13; ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]]
1
186
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define repr(e, x) f...
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define repn(i, n) for (int i = 1; i <= n; i++) #define repr(e, x) f...
[["+", 51, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 27, 17, 68], ["+", 51, 16, 12, 23, 0, 16, 31, 23, 0, 25], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 17, 33], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 12, 13]]
1
128
a=int(input()) name="" while (a>26): b=a%26 a=a//26 if b==0: b=26 name+=chr(b+96) name+=chr(a+96) name = name[::-1] print(name)
a=int(input()) name="" while (a>26): b=a%26 a=a//26 if b==0: b=26 a-=1 name+=chr(b+96) name+=chr(a+96) name = name[::-1] print(name)
[["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
66
#include <bits/stdc++.h> using namespace std; int main() { long N; cin >> N; vector<char> base{'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y'}; vector<char> answer; while (N > 0) { c...
#include <bits/stdc++.h> using namespace std; int main() { long N; cin >> N; vector<char> base{'z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y'}; vector<char> answer; while (N > 0) { c...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
200
def num2alpha(num): if num<=26: return chr(64+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(64+num%26) print(num2alpha(int(input())))
def num2alpha(num): if num<=26: return chr(64+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(64+num%26) print(num2alpha(int(input())).lower())
[["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
69
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i < n; i++) #define ll long long #define INF 21474836...
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i < n; i++) #define ll long long #define INF 21474836...
[["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13]]
1
208
#include <bits/stdc++.h> #include <cstdio> using namespace std; string a = "abcdefghijklmeopqrstuvwxyz"; int main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); long long n; long long p, c, m = 0, s[100]; cin >> n; p = 26; while (n != 0) //数制转换,结果存入数组s[m] { n -= 1; c = n % p; n = n ...
#include <bits/stdc++.h> #include <cstdio> using namespace std; string a = "abcdefghijklmnopqrstuvwxyz"; int main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); long long n; long long p, c, m = 0, s[1000]; cin >> n; p = 26; while (n != 0) //数制转换,结果存入数组s[m] { n -= 1; c = n % p; n = n...
[["-", 0, 30, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 30, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13]]
1
135
""" NTC here """ #!/usr/bin/env python import os import sys from io import BytesIO, IOBase profile = 0 pypy = 1 def iin(): return int(input()) def lin(): return list(map(int, input().split())) def main(): n = iin() ans = [] rf = ord('a') while n : x = n%26 if x == 0: ...
""" NTC here """ #!/usr/bin/env python import os import sys from io import BytesIO, IOBase profile = 0 pypy = 1 def iin(): return int(input()) def lin(): return list(map(int, input().split())) def main(): # for n in range(1, 1000): n = iin() ans = [] rf = ord('a') while n : x = ...
[["-", 0, 52, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
615
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; vector<char> ans(0); while (n > 1) { int x = n % 26; n = n / 26; if (x == 1) { ans.push_back('a'); } else if (x == 2) { ans.push_back('b'); } else if (x == 3) { ans.push_back('c'); } else...
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; vector<char> ans(0); while (n > 0) { int x = n % 26; n = n / 26; if (x == 1) { ans.push_back('a'); } else if (x == 2) { ans.push_back('b'); } else if (x == 3) { ans.push_back('c'); } else...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68]]
1
557
N = int(input()) S = '' while N: S += (chr(N%26+ord('a')-1)) N//=26 print(S[::-1])
N = int(input()) S = '' while N: N -= 1 S += (chr(N%26+ord('a'))) N//=26 print(S[::-1])
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 12, 23, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 12, 23, 0, 652, 3, 4, 0, 657, 12, 612]]
5
47
n=int(input()) c="" while(n>0): mod=n%26 if mod==0: mod=26 c+=chr(96+mod) n=n//26 print(c[::-1])
n=int(input()) c="" while(n>0): mod=n%26 if mod==0: mod=26 c+=chr(96+mod) n=(n-mod)//26 print(c[::-1])
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
55
n = int(input()) alpha = 'abcdefghijklmnopqrstuvwxyz' out = '' while n != 0: out = alpha[(n % 26) - 1] + out n = int(n // 26) print(out)
n = int(input()) alpha = 'abcdefghijklmnopqrstuvwxyz' out = '' while n != 0: out = alpha[(n % 26) - 1] + out n = int((n-1) // 26) print(out)
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]]
5
48
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; string ans; // n--; while (n) { ans += 'a' + ((n + 25) % 26); n /= 26; } reverse(ans.begin(), ans.end()); // for (int i = 0; i + 1 < ans.length(); ++i) ans[i]--; cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; string ans; // n--; while (n) { ans += 'a' + ((n + 25) % 26); n--; n /= 26; } reverse(ans.begin(), ans.end()); // for (int i = 0; i + 1 < ans.length(); ++i) ans[i]--; cout << ans << endl; return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
75
n = gets.to_i x = 1 s = [] while n > 0 y = x * 26 s << (97 + (n - 1) % y / x).chr x = y n -= x end p s.reverse.join
n = gets.to_i x = 1 s = [] while n > 0 y = x * 26 s << (97 + (n - 1) % y / x).chr x = y n -= x end puts s.reverse.join
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22]]
4
51
import numpy as np import math def num2alpha(num): if num<=26: return chr(96+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(96+num%26) N = int(input()) print(num2alpha(N))
import numpy as np import math def num2alpha(num): if num<=26: return chr(96+num) elif num%26==0: return num2alpha(num//26-1)+chr(122) else: return num2alpha(num//26)+chr(96+num%26) N = int(input()) print(num2alpha(N))
[["-", 0, 37, 0, 657, 12, 652, 3, 4, 0, 612], ["+", 0, 37, 0, 657, 12, 652, 3, 4, 0, 612]]
5
78
N = int(input()) name = [] while N>0: name.append(chr(ord('a')+(N-1)%26)) N = N // 26 name.reverse() print("".join(name))
N = int(input()) name = [] while N>0: name.append(chr(ord('a')+(N-1)%26)) N = (N - 1) // 26 name.reverse() print("".join(name))
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
59
#include <bits/stdc++.h> typedef uint64_t u64; typedef int64_t i64; typedef uint32_t u32; typedef int32_t i32; typedef uint16_t u16; typedef int16_t i16; typedef uint8_t u8; typedef int8_t i8; using namespace std; #define rep(idx, N) for (u64 idx = 0; idx < N; idx++) int main() { u64 n; const u64 d = 26; cin ...
#include <bits/stdc++.h> typedef uint64_t u64; typedef int64_t i64; typedef uint32_t u32; typedef int32_t i32; typedef uint16_t u16; typedef int16_t i16; typedef uint8_t u8; typedef int8_t i8; using namespace std; #define rep(idx, N) for (u64 idx = 0; idx < N; idx++) int main() { u64 n; const u64 d = 26; cin ...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
131
import java.util.Scanner; public class Main { public static void main(String[] args) { var sc = new Scanner(System.in); var n = sc.nextLong(); sc.close(); var sb = new StringBuilder(); while (n > 0) { sb.append((char)('a' + ((n - 1) % 26))); n = n / 26; } sb.reverse(); Sy...
import java.util.Scanner; public class Main { public static void main(String[] args) { var sc = new Scanner(System.in); var n = sc.nextLong(); sc.close(); var sb = new StringBuilder(); while (n > 0) { sb.append((char)('a' + ((n - 1) % 26))); n = (n - 1) / 26; } sb.reverse(); ...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 499], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
3
113
//#include <bits/stdc++.h> #include <algorithm> #include <chrono> #include <iomanip> #include <iosfwd> #include <iostream> #include <iterator> #include <limits.h> #include <limits> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #...
//#include <bits/stdc++.h> #include <algorithm> #include <chrono> #include <iomanip> #include <iosfwd> #include <iostream> #include <iterator> #include <limits.h> #include <limits> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #...
[["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
590
########関数部分############## def num2alpha(num): if num<=26: return chr(64+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(64+num%26) ############################ import numpy as np n = int(input()) print (n) x = num2alpha(n).lower() prin...
########関数部分############## def num2alpha(num): if num<=26: return chr(64+num) elif num%26==0: return num2alpha(num//26-1)+chr(90) else: return num2alpha(num//26)+chr(64+num%26) ############################ import numpy as np n = int(input()) x = num2alpha(n).lower() print (x)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
89
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long n; ci...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { long long n; ci...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]]
1
128
def main(): N = int(input()) n = N ans = [] while n > 0: remain = n % 26 ans.append(chr(ord('a') + remain - 1)) n //= 26 print(''.join(reversed(ans))) main()
def main(): N = int(input()) n = N ans = [] while n > 0: n -= 1 remain = n % 26 ans.append(chr(ord('a') + remain)) n //= 26 print(''.join(reversed(ans))) main()
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]]
5
67
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iterator> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; long long n; std::vector<char> ans; int main() { scanf("%lld", &n); ans.clear(); while (n > 0)...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iterator> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; long long n; std::vector<char> ans; int main() { scanf("%lld", &n); ans.clear(); while (n > 0)...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
141
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
#include <bits/stdc++.h> using namespace std; inline int ctoi(char c) { if (c < '0' || '9' < c) throw invalid_argument("ctoi error"); return c - '0'; } #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define REP(i, k, n) for (int i = (int)(k); i < (int)(n); i++) #define all(x) (x).begin(), (x).end() tem...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 16, 12, 74, 51, 23, 0, 16, 17, 33], ["-", 0, 16, 12, 74, 51, 23, 0, 16, 12, 13]]
1
280
#include <float.h> #include <inttypes.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif #define getchar getchar #define putchar putchar int...
#include <float.h> #include <inttypes.h> #include <limits.h> #include <math.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif #define getchar getchar #define putchar putchar int...
[["-", 8, 9, 0, 52, 15, 23, 0, 16, 31, 22], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 31, 22]]
0
456
n = int(input()) lis = [] while n != 0: if n%26 == 0: lis.append(int(0)) n /= 26 else: lis.append(int(n%26)) n -= n%26 n /= 26 alp = ["z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"] st = "" for i in range(len(lis),0...
n = int(input()) lis = [] while n != 0: if n%26 == 0: lis.append(int(0)) n -= 26 n /= 26 else: lis.append(int(n%26)) n -= n%26 n /= 26 alp = ["z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y"] st = "" for i in ...
[["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 31, 22]]
5
199
N=int(input()) ans='' alp=list('abcdefghijklmnopqrstuvwxyz') while N != 0: N,mod=divmod(N,26) ans=alp[mod-1]+ans print(ans) #27 -> aa 26 + 1
N=int(input()) #N=1000000000000001 ans='' alp=list('abcdefghijklmnopqrstuvwxyz') while N != 0: N,mod=divmod(N-1,26) ans=alp[mod]+ans print(ans) #27 -> aa 26 + 1
[["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 662, 12, 657, 31, 206, 206, 657, 17, 33], ["-", 0, 662, 12, 657, 31, 206, 206, 657, 12, 612]]
5
50
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { ll N; cin >> N; string ans = ""; char letter; while (N != 0) { if (N % 26 != 0) { letter = 'a' + N % 26 - 1; } else { letter = 'z'; } ans = letter + an...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main() { ll N; cin >> N; string ans = ""; char letter; while (N != 0) { if (N % 26 != 0) { letter = 'a' + N % 26 - 1; } else { letter = 'z'; N -= 1; } ans...
[["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 110], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]]
1
99
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { string alpha = "zabcdefghijklmnopqrstuvwxy"; ll n; cin >> n; string res; while (n != 0) { ll i = n % 26; res.push_back(alpha[i]); n /= 26; } for (ll j = res.size() - 1; j >= 0; j--) cout << res[j]; }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { string alpha = "abcdefghijklmnopqrstuvwxyz"; ll n; cin >> n; string res; while (n != 0) { n--; ll i = n % 26; res.push_back(alpha[i]); n /= 26; } for (ll j = res.size() - 1; j >= 0; j--) cout << res[...
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
91
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) using namespace std; using ll = long long; const int INF = (1 << 30) - 1; const long long LINF = (1LL << 62) - 1; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, T b) { if (a < b) { ...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) using namespace std; using ll = long long; const int INF = (1 << 30) - 1; const long long LINF = (1LL << 62) - 1; const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, 1, 0, -1}; template <class T> inline bool chmax(T &a, T b) { if (a < b) { ...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
217
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <ss...
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <ss...
[["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 2, 3, 4, 0, 16, 31, 103, 0, 125], ["+", 0, 2, 3, 4, 0, 16, 31, 103, 0, 125], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
182
#include <iostream> #include <map> #include <queue> #include <stack> #include <unordered_map> using namespace std; int main() { long long int n; cin >> n; stack<char> a; while (n > 0) { a.push('a' + (n % 26) - 1); n /= 26; } while (!a.empty()) { cout << a.top(); a.pop(); } cout << end...
#include <iostream> #include <map> #include <queue> #include <stack> #include <unordered_map> using namespace std; int main() { long long int n; cin >> n; stack<char> a; while (n > 0) { n--; a.push('a' + (n % 26)); n /= 26; } while (!a.empty()) { cout << a.top(); a.pop(); } cout <...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
96
/* Author: Babin Dutta */ #include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define ll long long int #define pb push_back #define mp make_pair #define boost \ ios_base::sync_with_stdio(false); ...
/* Author: Babin Dutta */ #include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define ll long long int #define pb push_back #define mp make_pair #define boost \ ios_base::sync_with_stdio(false); ...
[["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33]]
1
340
import sys l = sys.stdin.readline().rstrip('\n').split(' ') N = int(l[0]) digits = 1 while True: ub = 26 ** digits if N <= ub: break N -= ub digits += 1 ans = '' N -= 1 for pos in range(digits): offset = N % 26 digit = chr(ord('a') + offset) ans = digit + ans N /= 26 print(...
import sys ...
[["-", 0, 7, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 691]]
5
102
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; void solve(ll n) { if (!n) return; solve(n / 26); putchar((n - 1) % 26 + 'a'); } int main(void) { ll n; scanf("%lld", &n); solve(n); return 0; ...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; void solve(ll n) { if (!n) return; solve((n - 1) / 26); putchar((n - 1) % 26 + 'a'); } int main(void) { ll n; scanf("%lld", &n); solve(n); retu...
[["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 25]]
1
86
// libraries #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> // namespace using namespace std; using namespace __gnu_pbds; // typedef // typedef tree<long long,null_type,less<long // long>,rb_tree_tag,tree_order_s...
// libraries #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> #include <ext/pb_ds/tree_policy.hpp> // namespace using namespace std; using namespace __gnu_pbds; // typedef // typedef tree<long long,null_type,less<long // long>,rb_tree_tag,tree_order_s...
[["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
361
import sys # import re import math import collections # import decimal import bisect import itertools import fractions # import functools import copy # import heapq import decimal # import statistics import queue # import numpy as np sys.setrecursionlimit(10000001) INF = 10 ** 16 MOD = 10 ** 9 + 7 # MOD = 998244353 ...
import sys # import re import math import collections # import decimal import bisect import itertools import fractions # import functools import copy # import heapq import decimal # import statistics import queue # import numpy as np sys.setrecursionlimit(10000001) INF = 10 ** 16 MOD = 10 ** 9 + 7 # MOD = 998244353 ...
[["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 612]]
5
164
#include <algorithm> #include <array> #include <bitset> #include <chrono> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #includ...
#include <algorithm> #include <array> #include <bitset> #include <chrono> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <string> #include <unordered_map> #includ...
[["-", 8, 9, 0, 82, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 82, 15, 23, 0, 16, 17, 20]]
1
2,002
#include <iostream> #include <vector> char x[10000]; int main() { long long n; scanf("%d", &n); n--; int l = 1; long long x = 26; while (x <= n) { n -= x; x *= 26; l++; } for (int i = 0; i < l; i++) { ::x[l - 1 - i] = 'a' + n % 26; // printf("%c", 'a' + n % 26); n /= 26; } pr...
#include <iostream> #include <vector> char x[10000]; int main() { long long n; scanf("%lld", &n); n--; int l = 1; long long x = 26; while (x <= n) { n -= x; x *= 26; l++; } for (int i = 0; i < l; i++) { ::x[l - 1 - i] = 'a' + n % 26; // printf("%c", 'a' + n % 26); n /= 26; } ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
116
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; /*bool compare_function(const pair<int, int> a, const pair<int, int> b) { return a.first ...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long int ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; /*bool compare_function(const pair<int, int> a, const pair<int, int> b) { return a.first ...
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
159
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define vl vector<ll> #define rep(i, n) for (int i = 0; i < (n); ++i) int main() { ll N; cin >> N; N--; string ans = ""; while (N > 0) { int a = N % 26; char c = 'a' + a; ans = c + ans; N /= 26; ...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define vl vector<ll> #define rep(i, n) for (int i = 0; i < (n); ++i) int main() { ll N; cin >> N; N--; string ans = ""; while (N >= 0) { int a = N % 26; char c = 'a' + a; ans = c + ans; N /= 26; ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
91
#include <bits/stdc++.h> #define ALL(a) (a).begin(), (a).end() #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<long long, long long> Pll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<long long> vll; typedef vector<vector<long long>...
#include <bits/stdc++.h> #define ALL(a) (a).begin(), (a).end() #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<long long, long long> Pll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<long long> vll; typedef vector<vector<long long>...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
281
#include <bits/stdc++.h> #define ll long long int using namespace std; const int mod = 1e9 + 7; const int inf = (1 << 30); string toBin(ll a); void printMat(int arr[], int n); void printMat(vector<int> arr, int n); void printMat(vector<vector<int>> arr, int n, int m); void printMat(vector<int> arr[], int n); // void pr...
#include <bits/stdc++.h> #define ll long long int using namespace std; const int mod = 1e9 + 7; const int inf = (1 << 30); string toBin(ll a); void printMat(int arr[], int n); void printMat(vector<int> arr, int n); void printMat(vector<vector<int>> arr, int n, int m); void printMat(vector<int> arr[], int n); // void pr...
[["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]]
1
501
#include <bits/stdc++.h> #include <iostream> typedef unsigned long long int ll; using namespace std; int main() { // your code goes here ll n; cin >> n; string s = ""; while (n) { int temp = n % 26; if (temp == 0) temp = 26; s += ('a' + temp - 1); n = n / 26; } reverse(s.begin(), s....
#include <bits/stdc++.h> #include <iostream> typedef unsigned long long int ll; using namespace std; int main() { // your code goes here ll n; cin >> n; string s = ""; while (n) { int temp = n % 26; if (temp == 0) { temp = 26; n--; } s += ('a' + temp - 1); n = n / 26; } re...
[["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]]
1
100