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 |
|---|---|---|---|---|
ans = ""
N = int(input())
for i in range(10000):
tmp = N%26
ans += chr(96+tmp)
N //= 26
if N <= 0:
break
print(ans[::-1])
| ans = ""
N = int(input())
for i in range(10000):
N -= 1
tmp = N%26
ans += chr(97+tmp)
N //= 26
if N <= 0:
break
print(ans[::-1])
| [["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["-", 0, 677, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 677, 12, 652, 3, 4, 0, 657, 31, 612]] | 5 | 52 |
import java.util.*;
public class Main {
static public void main(String args[]) {
Scanner sc = new Scanner(System.in);
Long nu = sc.nextLong();
String str = "abcdefghijklmnopqrstuvwxyz";
List<String> list = new ArrayList<>();
do {
String s = Long.toString(nu % 26);
// System.out.pr... |
import java.util.*;
public class Main {
static public void main(String args[]) {
Scanner sc = new Scanner(System.in);
Long nu = sc.nextLong();
String str = "abcdefghijklmnopqrstuvwxyz";
List<String> list = new ArrayList<>();
do {
nu--;
String s = Long.toString(nu % 26);
// S... | [["+", 0, 82, 8, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 82, 8, 196, 0, 1, 0, 27, 0, 68], ["+", 8, 196, 0, 82, 8, 196, 0, 1, 0, 35], ["-", 3, 4, 0, 492, 3, 4, 0, 16, 17, 33], ["-", 3, 4, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 151 |
import sys
sys.setrecursionlimit(10**6)
n = int(input())
d = {(i-97+1):chr(i)%26 for i in range(97,97+26)}
#d[0] = 'z'
l = []
while n > 0:
tmp = n%26
l.append(tmp)
if tmp == 0:
n = n//26-1
else:
n //= 26
ans = ''
for i in l[::-1]:
ans += d[i]
print(ans) | import sys
sys.setrecursionlimit(10**6)
n = int(input())
d = {(i-97+1)%26:chr(i) for i in range(97,97+26)}
#d[0] = 'z'
l = []
while n > 0:
tmp = n%26
l.append(tmp)
if tmp == 0:
n = n//26-1
else:
n //= 26
ans = ''
for i in l[::-1]:
ans += d[i]
print(ans) | [["+", 0, 662, 12, 703, 8, 569, 448, 657, 17, 109], ["+", 0, 662, 12, 703, 8, 569, 448, 657, 12, 612], ["-", 0, 662, 12, 703, 8, 569, 51, 657, 17, 109], ["-", 0, 662, 12, 703, 8, 569, 51, 657, 12, 612]] | 5 | 110 |
// g++ -std=c++17 -Wshadow -Wall -fsanitize=address -fsanitize=undefined
// -D_GLIBCXX_DEBUG -g PROGRAM -o OUTPUT -DLOCAL -lasan -lubsan
#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define all(x... | // g++ -std=c++17 -Wshadow -Wall -fsanitize=address -fsanitize=undefined
// -D_GLIBCXX_DEBUG -g PROGRAM -o OUTPUT -DLOCAL -lasan -lubsan
#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define all(x... | [["+", 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 | 631 |
//“Make it work, make it right, make it fast.” – Kent Beck
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double dd;
const int siz = 1e6 + 5;
const int MOD = 1e9 + 7;
#define endl '\n'
#define deb(x) cout << #x << " = " << x << endl;
void solve() {
ll n;
cin >> n;
ll a = 26;
s... | //“Make it work, make it right, make it fast.” – Kent Beck
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double dd;
const int siz = 1e6 + 5;
const int MOD = 1e9 + 7;
#define endl '\n'
#define deb(x) cout << #x << " = " << x << endl;
void solve() {
ll n;
cin >> n;
ll a = 26;
s... | [["+", 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, 74, 51, 23, 0, 16, 17, 33], ["-", 0, 11, 12, 74, 51, 23, 0, 16, 12, 13]] | 1 | 158 |
#include <bits/stdc++.h>
using namespace std;
#define rapido \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | #include <bits/stdc++.h>
using namespace std;
#define rapido \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#define int l... | [["+", 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 | 104 |
#include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
//#include <bits/stdc++.h>
using namespace std;
const long long X = 1000000000000001;
int mai... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
//#include <bits/stdc++.h>
using namespace std;
const long long X = 1000000000000001;
int mai... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 279 |
n = int(input())
mod = 26
x = 1
l = list()
while True:
if n <= mod:
print(n)
for i in range(x):
l.append(n%26)
n = n//26
break
else:
n -= mod
mod *= 26
x += 1
l.reverse()
l2 = list()
# if l.count(0) == x:
# print("z"*x)
# exit()
# ... | n = int(input())
mod = 26
x = 1
l = list()
while True:
if n <= mod:
for i in range(x):
l.append(n%26)
n = n//26
break
else:
n -= mod
mod *= 26
x += 1
l.reverse()
l2 = list()
# if l.count(0) == x:
# print("z"*x)
# exit()
# for i in range(le... | [["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 191 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
string res = "";
while (n > 0) {
int index = (n - 1) % 26;
res = char(index + 'A') + res;
n = (n - 1) / 26;
}
cout << res << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
string res = "";
while (n > 0) {
int index = (n - 1) % 26;
res = char(index + 'a') + res;
n = (n - 1) / 26;
}
cout << res << endl;
return 0;
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 31, 2, 3, 4, 0, 16, 12, 103, 0, 125], ["+", 31, 2, 3, 4, 0, 16, 12, 103, 0, 125]] | 1 | 74 |
import os
import sys
from io import BytesIO, IOBase
import math
def main():
#n,k=list(map(int,input().split()))
#a=list(map(int,input().split()))
n=int(input())
res=""
while n:
n-=1
res+=chr(ord("a")+n%26)
n//=26
print(res)
# region fastio
BUFSIZE = 8192
cla... | import os
import sys
from io import BytesIO, IOBase
import math
def main():
#n,k=list(map(int,input().split()))
#a=list(map(int,input().split()))
n=int(input())
res=""
while n:
n-=1
res=chr(ord("a")+n%26)+res
n//=26
print(res)
# region fastio
BUFSIZE = 8192
... | [["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 524 |
n = int(input())
# # 名前の長さを求める
i = 1
while 1:
# print(i)
if n <= 26 ** i:
break
else:
n -= 26**i
i += 1
print(i)
name = ""
n -= 1
for j in range(i):
name += chr(ord('a') + n % 26)
n //= 26
print(name[::-1]) | n = int(input())
# # 名前の長さを求める
i = 1
while 1:
# print(i)
if n <= 26 ** i:
break
else:
n -= 26**i
i += 1
name = ""
n -= 1
for j in range(i):
name += chr(ord('a') + n % 26)
n //= 26
print(name[::-1]) | [["-", 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 | 81 |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i < n; ++i)
#define exrep(i, a, b) for (ll i = a; i < b; i++)
#define out(x) cout << x <<... | #include <bits/stdc++.h>
using namespace std;
//#define int long long
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i < n; ++i)
#define exrep(i, a, b) for (ll i = a; i < b; i++)
#define out(x) cout << x <<... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 504 |
/*
AABRA KA DABRA.. !!
*/
#include "bits/stdc++.h"
using namespace std;
typedef long double ld;
#define int long long
#define RAGE \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | /*
AABRA KA DABRA.. !!
*/
#include "bits/stdc++.h"
using namespace std;
typedef long double ld;
#define int long long
#define RAGE \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | [["+", 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, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 394 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
string a = "abcdefghijklmnopqrstuvwxyz";
string ret = "";
while (n > 0) {
ret += a[(int)(n % 26) - 1];
n /= 26;
}
reverse(ret.begin(), ret.end());
cout << ret << endl;
return 0;
}
// 9223372036854775807 ->... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
string a = "abcdefghijklmnopqrstuvwxyz";
string ret = "";
while (n > 0) {
--n;
ret += a[(int)(n % 26)];
n /= 26;
}
reverse(ret.begin(), ret.end());
cout << ret << endl;
return 0;
}
// 92233720368547758... | [["+", 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, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 88 |
def xxx(n):
ans = ""
i = 1
while True:
if n <= 26 ** i:
n -= 1
for j in range(i):
ans = char(ord("a") + n%26) + ans
n //= 26
return ans
else:
n -= 26 ** i
i += 1
N = int(input())
print(xxx(N)) | def xxx(n):
ans = ""
i = 1
while True:
if n <= 26 ** i:
n -= 1
for j in range(i):
ans = chr(ord("a") + n%26) + ans
n //= 26
return ans
else:
n -= 26 ** i
i += 1
N = int(input())
print(xxx(N)) | [["-", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 652, 63, 22]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, val) for (int i = 0; i < val; i++)
const long long INF = 1LL << 60;
const ll MOD = ll(1e9) + 7;
bool has_key(unordered_map<string, ll> &m, string s) {
if (m.find(s) == m.end()) {
return false;
} else {
return true;
}
}
b... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, val) for (int i = 0; i < val; i++)
const long long INF = 1LL << 60;
const ll MOD = ll(1e9) + 7;
bool has_key(unordered_map<string, ll> &m, string s) {
if (m.find(s) == m.end()) {
return false;
} else {
return true;
}
}
b... | [["+", 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 | 654 |
#include <algorithm>
#include <cmath>
#include <iomanip> //setprecision()
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
double Mcos(double k) { return cos(k * atan(1.0) * 4 / 180); }
void monmo() {}
int main() {
ll ... | #include <algorithm>
#include <cmath>
#include <iomanip> //setprecision()
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using ll = long long;
using namespace std;
double Mcos(double k) { return cos(k * atan(1.0) * 4 / 180); }
void monmo() {}
int main() {
ll ... | [["-", 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 | 136 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long n;
vector<char> a;
string x = "0abcdefghijklmnopqrstuvwxyz";
int main() {
cin >> n;
while (n) {
a.push_back(x[n % 26]);
n /= 26;
}
reverse(a.begin(), a.end());
for (int i = 0; i < a.size(); i++)
cout << a[i];... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long n;
vector<char> a;
string x = "abcdefghijklmnopqrstuvwxyz";
int main() {
cin >> n;
while (n) {
n--;
a.push_back(x[n % 26]);
n /= 26;
}
reverse(a.begin(), a.end());
for (int i = 0; i < a.size(); i++)
cout ... | [["-", 0, 30, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 30, 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 | 102 |
def main():
N = int(input())
ans = ""
while N:
N -= 1
tmp = N % 26
txt = chr(tmp + ord("a"))
N //= 26
print(ans[::-1])
if __name__ == '__main__':
main() | def main():
N = int(input())
ans = ""
while N:
N -= 1
tmp = N % 26
ans += chr(tmp + ord("a"))
N //= 26
print(ans[::-1])
if __name__ == '__main__':
main() | [["-", 0, 52, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 52, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 107]] | 5 | 64 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
template <typename TYPE> void print_vec(const vector<TYPE> &v) {
for (int i = 0; i < v.size(); i++) {
cout << v[i] << " ";
}
cout << endl;
}
template <typename TYPE> void print_vec2(const vector<vector<TYPE>> &v) {
for (int i = 0; i < v.s... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
template <typename TYPE> void print_vec(const vector<TYPE> &v) {
for (int i = 0; i < v.size(); i++) {
cout << v[i] << " ";
}
cout << endl;
}
template <typename TYPE> void print_vec2(const vector<vector<TYPE>> &v) {
for (int i = 0; i < v.s... | [["+", 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 | 249 |
#include <stdio.h>
typedef long long LL;
int sz = 0;
LL IN(void) {
LL x = 0;
int f = 0, c = getchar();
while (c < 48 || c > 57) {
f ^= c == 45, c = getchar();
}
while (c > 47 && c < 58) {
x = x * 10 + c - 48, c = getchar();
}
return f ? -x : x;
}
int main(void) {
LL N = IN();
int str[12];
wh... | #include <stdio.h>
typedef long long LL;
int sz = 0;
LL IN(void) {
LL x = 0;
int f = 0, c = getchar();
while (c < 48 || c > 57) {
f ^= c == 45, c = getchar();
}
while (c > 47 && c < 58) {
x = x * 10 + c - 48, c = getchar();
}
return f ? -x : x;
}
int main(void) {
LL N = IN();
int str[12];
wh... | [["+", 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, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 170 |
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
n = ni()
def f(k):
return chr(97+k)
c = 0
i = 1
while True:
d = c+pow(26,i)
if c < n <=... | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
n = ni()
def f(k):
return chr(97+k)
c = 0
i = 1
while True:
d = c+pow(26,i)
if c < n <=... | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20]] | 5 | 187 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 100000000;
#define rep1(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, k, n) for (ll i = k; i < (n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll INF = 100000000;
#define rep1(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, k, n) for (ll i = k; i < (n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return ... | [["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 230 |
#pragma GCC optimize("Ofast")
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <vector>
const long long INF = 1e17 + 7;
const long long MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
const double PI = acos(-1);
usi... | #pragma GCC optimize("Ofast")
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <vector>
const long long INF = 1e17 + 7;
const long long MOD = 1e9 + 7;
const int SIZE = 1e6 + 10;
const double PI = acos(-1);
usi... | [["+", 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], ["-", 12, 74, 51, 23, 0, 16, 31, 16, 17, 33], ["-", 12, 74, 51, 23, 0, 16, 31, 16, 12, 13]] | 1 | 152 |
n = int(input())
moji = [chr(i) for i in range(97, 97+26)]
name = ''
while n > 0:
n -= 1
name += moji[(n%26)-1]
n = n // 26
print(name[::-1]) | n = int(input())
moji = [chr(i) for i in range(97, 97+26)]
name = ''
while n > 0:
n -= 1
name += moji[(n%26)]
n = n // 26
print(name[::-1]) | [["-", 0, 1, 0, 677, 12, 206, 206, 657, 17, 33], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 12, 612]] | 5 | 66 |
#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using namespace std;
int main() {
ll n;
cin >> n;
string ans = "";
ll digit = 1;
ll exp26 = 26;
while (true) {
if (n <= exp26) {
break;
}
n -= exp26;
digit++;
exp26 *= 26;
}
... | #include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using namespace std;
int main() {
ll n;
cin >> n;
string ans = "";
ll digit = 1;
ll exp26 = 26;
while (true) {
if (n <= exp26) {
break;
}
n -= exp26;
digit++;
exp26 *= 26;
}
... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]] | 1 | 161 |
#!python3
import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
def resolve():
N = int(input())
s = " abcdefghijklmnopqrstuvwxyz"
ans = ""
a = N
while a:
a, b = divmod(a, 26)
ans = s[b] + ans
print(ans)
if __name__ == "__main__":
resolve()
| #!python3
import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
def resolve():
N = int(input())
s = "abcdefghijklmnopqrstuvwxyz"
ans = ""
a = N
while a:
a -= 1
a, b = divmod(a, 26)
ans = s[b] + ans
print(ans)
if __name__ == "__main__":
resolve(... | [["-", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 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 | 87 |
n = int(input())
s = ''
while n > 0:
n-=1
ans += chr(ord('a') + n%26)
n//=26
print(ans[::-1])
| n = int(input())
s = ''
while n > 0:
n-=1
s += chr(ord('a') + n%26)
n//=26
print(s[::-1]) | [["-", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22]] | 5 | 48 |
n=int(input())
ans=[]
data=["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"]
while(n>0):
n-=1
ans.append(n%26)
n=n//26
print(ans)
for i in range(len(ans)-1,-1,-1):
print(data[ans[i]],end="")
| n=int(input())
ans=[]
data=["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"]
while(n>0):
n-=1
ans.append(n%26)
n=n//26
for i in range(len(ans)-1,-1,-1):
print(data[ans[i]],end="")
| [["-", 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 | 180 |
N =int(input())
ans = ""
while True:
matsubi = N%26
matsubi = chr(96+matsubi)
ans += matsubi
if N//26 == 0:
break
else:
N//=26
ans = ans[::-1]
print(ans) | N =int(input())
ans = ""
while True:
N-=1
matsubi = N%26
matsubi = chr(96+matsubi+1)
ans += matsubi
if N//26 == 0:
break
else:
N//=26
ans = ans[::-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], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 57 |
import java.lang.Math;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
long N = sc.nextLong();
int amari = 0;
String ans = "";
long kari = 0;
// System.out.println(N);
List<String>... | import java.lang.Math;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
long N = sc.nextLong();
int amari = 0;
String ans = "";
long kari = 0;
// System.out.println(N);
List<String>... | [["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 17, 110], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 499], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35]] | 3 | 266 |
def main():
n = int(input())
alp = "zabcdefghijklmnopqrstuvwxy"
res = ""
for i in range(1,100):
if(n<=26**i):
for j in range(i):
res+=chr(ord("a")+n%26)
n//=26
break
else:
n-=26**i
print(res[::-1])
if __name__ == '... | def main():
n = int(input())
alp = "zabcdefghijklmnopqrstuvwxy"
res = ""
for i in range(1,100):
if(n<=26**i):
n-=1
for j in range(i):
res+=chr(ord("a")+n%26)
n//=26
break
else:
n-=26**i
print(res[::-1])
... | [["+", 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 | 95 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
string alpha = "zabcdefghijklmnopqrstuvwxy";
int main() {
ll n;
cin >> n;
string ans;
while (n > 0) {
int num = n % 26;
ans += alpha[num];
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << endl... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
string alpha = "abcdefghijklmnopqrstuvwxyz";
int main() {
ll n;
cin >> n;
string ans;
while (n > 0) {
n--;
int num = n % 26;
ans += alpha[num];
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << an... | [["-", 0, 30, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 30, 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 | 92 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (i = 0; i < n; i++)
// 2D::rep(i,j)rep(j,j)cin>>bin[i][j];
// vector<int> a(n)
#define Graph vector<vector<int>>
#define A1 cout << "No" << endl
#define A2 cout << "Yes" << endl
#define A3 cout << ans
#define AA(i) cout << i << en... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (i = 0; i < n; i++)
// 2D::rep(i,j)rep(j,j)cin>>bin[i][j];
// vector<int> a(n)
#define Graph vector<vector<int>>
#define A1 cout << "No" << endl
#define A2 cout << "Yes" << endl
#define A3 cout << ans
#define AA(i) cout << i << en... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 90], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 151 |
import math
N=int(input())
a=[chr(i) for i in range(97, 97+26)]
# [chr(i) for i in range(ord('a'), ord('z')+1)]
if N>26:
answers = []
while N >= 26:
N-=1
b = N % 26
answers.append(a[b ])
N = N // 26
answers.reverse()
b = ''
for a in answers:
b += a
print... | import math
N=int(input())
a=[chr(i) for i in range(97, 97+26)]
# [chr(i) for i in range(ord('a'), ord('z')+1)]
if N>26:
answers = []
while N > 0:
N-=1
b = N % 26
answers.append(a[b ])
N = N // 26
answers.reverse()
b = ''
for a in answers:
b += a
print(b... | [["-", 0, 57, 64, 196, 0, 52, 15, 666, 667, 20], ["-", 0, 57, 64, 196, 0, 52, 15, 666, 0, 612], ["+", 0, 57, 64, 196, 0, 52, 15, 666, 667, 47], ["+", 0, 57, 64, 196, 0, 52, 15, 666, 0, 612]] | 5 | 98 |
n = int(input())
a = ""
while n > 0:
n, r = divmod(n, 26)
if r == 0:
r = 26
a += chr(r-1 + ord('a'))
print(a[::-1])
| n = int(input())
a = ""
while n > 0:
n, r = divmod(n, 26)
if r == 0:
r = 26
n -= 1
a += chr(r-1 + ord('a'))
print(a[::-1])
| [["+", 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 | 60 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
// make input and output more efficient
ios::sync_with_stdio(0);
cin.tie(0);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// to read whole line
// string s;
// ge... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
// make input and output more efficient
ios::sync_with_stdio(0);
cin.tie(0);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
// to read whole line
// string s;
// ge... | [["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 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 | 138 |
n=gets.to_i
a=[*'a'..'z']
res= ''
while n > 0
n-=1
res += a[N%26]
n/=26
end
puts res | n=gets.to_i
a=[*'a'..'z']
res= ''
while n > 0
n-=1
res += a[n%26]
n/=26
end
puts res.reverse
| [["-", 8, 170, 0, 755, 12, 742, 0, 738, 31, 743], ["+", 8, 170, 0, 755, 12, 742, 0, 738, 31, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 735, 22]] | 4 | 42 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, i;
cin >> n;
string ans;
while (n > 0) {
if (n % 26 == 0)
ans += 'z';
else
ans += ('a' + (n - 1) % 26);
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, i;
cin >> n;
string ans;
while (n > 0) {
if (n % 26 == 0)
ans += 'z';
else
ans += ('a' + (n - 1) % 26);
n -= 1;
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans;
} | [["+", 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 | 91 |
def main():
N = int(input())
MOD = 26
ans = str()
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'n', 'm', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
while N > 0:
N -= 1
ans = alpha[N % MOD] + ans
N //= MOD
print(ans)
if _... | def main():
N = int(input())
MOD = 26
ans = str()
alpha = ['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']
while N > 0:
N -= 1
ans = alpha[N % MOD] + ans
N //= MOD
print(ans)
if __... | [["-", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6], ["+", 0, 1, 0, 662, 12, 634, 0, 557, 0, 6]] | 5 | 163 |
import string
n = int(input())
f = []
if n > 26:
while n:
n -= 1
n, r = divmod(n, 26)
f += [r]
else:
f += [n]
g = ''
s = string.ascii_lowercase
f.reverse()
for i in f:
g += s[i]
print(g) | import string
n = int(input())
f = []
if n > 26:
while n:
n -= 1
n, r = divmod(n, 26)
f += [r]
else:
f += [n-1]
g = ''
s = string. ascii_lowercase
f.reverse()
for i in f:
g += s[i]
print(g) | [["+", 0, 1, 0, 677, 12, 634, 0, 657, 17, 33], ["+", 0, 1, 0, 677, 12, 634, 0, 657, 12, 612]] | 5 | 76 |
#include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < ... | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < ... | [["+", 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 | 309 |
al = [chr(ord('a') + i) for i in range(26)]
n = int(input())
s = ""
while n:
s += al[a % 26 - 1]
n = (n - 1) // 26
print(s[::-1]) | al = [chr(ord('a') + i) for i in range(26)]
n = int(input())
s = ""
while n:
s += al[n % 26 - 1]
n = (n - 1) // 26
print(s[::-1]) | [["-", 0, 677, 12, 206, 206, 657, 31, 657, 31, 22], ["+", 0, 677, 12, 206, 206, 657, 31, 657, 31, 22]] | 5 | 66 |
n = int(input())
alphabet = ['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']
ln = []
while True:
n -= 1
b = n % 26
ln.append(alphabet[b])
if n <= 26:
break
a = n//26
n = a
ln.reverse()
ln=''.join(ln)
print(ln) | n = int(input())
alphabet = ['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']
ln = []
while True:
n -= 1
b = n % 26
ln.append(alphabet[b])
if n <= 25:
break
a = n//26
n = a
ln.reverse()
ln=''.join(ln)
print(ln) | [["-", 0, 52, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 0, 612]] | 5 | 171 |
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
if row <= 0:
... | import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
if row <= 0:
... | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 301 |
N = int(input())
def base10to(n, b):
if n // b:
return base10to(n // b - 1, b) + ',' + str(n % b)
return str(n % b)
res_26 = base10to(N - 1, 26)
print(res_26)
res = []
for s in res_26.split(','):
res.append(chr(97 + int(s)))
print(''.join(res))
| N = int(input())
def base10to(n, b):
if n // b:
return base10to(n // b - 1, b) + ',' + str(n % b)
return str(n % b)
res_26 = base10to(N - 1, 26)
res = []
for s in res_26.split(','):
res.append(chr(97 + int(s)))
print(''.join(res)) | [["-", 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 | 104 |
number = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
name_tag = []
while number != 0:
number, a = divmod(number-1, 26)
name_tag.append(a)
reverse_name_tag = reversed(name_tag)
for i in reverse_name_tag:
print(alphabet[i-1], end="") | number = int(input())
alphabet = [chr(i) for i in range(97, 97+26)]
name_tag = []
while number > 0:
number, a = divmod(number-1, 26)
name_tag.append(a)
reverse_name_tag = reversed(name_tag)
for i in reverse_name_tag:
print(alphabet[i], end="")
| [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 79], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]] | 5 | 79 |
import string
alphabets = "abcdefghijklmnopqrstuvwxyz"
n = 26
ans = ''
tmp = int(input())
while tmp >= n:
tmp -= 1
idx = tmp % n
ans = alphabets[idx] + ans
tmp //= n
print(ans)
| import string
alphabets = "abcdefghijklmnopqrstuvwxyz"
n = 26
ans = ''
tmp = int(input())
while tmp > 0:
tmp -= 1
idx = tmp % n
ans = alphabets[idx] + ans
tmp //= n
print(ans)
| [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 0, 612]] | 5 | 50 |
def main():
n = int(input())
ascii_lowercase = 'zabcdefghijklmnopqrstuvwxy'
s = ''
while n>0:
i = n % 26
s += ascii_lowercase[i]
n = n // 26
out = s[::-1]
print(out)
main() | def main():
n = int(input())
ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
s = ''
while n>0:
n -= 1
i = n % 26
s += ascii_lowercase[i]
n = n // 26
out = s[::-1]
print(out)
main() | [["-", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 8, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 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 | 59 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, b, j = 0;
cin >> n;
long long i = n;
char a[50] = {0};
do {
b = i % 26;
i /= 26;
a[j] = b + 96;
if (a[j] == 96) {
a[j] = 122;
}
j++;
} while (i != 0);
for (int c = j - 1; c >= 0; c--) {
cout << a[c];
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, b, j = 0;
cin >> n;
long long i = n;
char a[50] = {0};
do {
b = i % 26;
i /= 26;
a[j] = b + 96;
if (a[j] == 96) {
a[j] = 122;
i--;
}
j++;
} while (i != 0);
for (int c = j - 1; c >= 0; c--) {
cou... | [["+", 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 | 120 |
#include <bits/stdc++.h>
#define int long long
#define max(a, b) max((signed)a, (signed)b)
#define mn(a, b) min((signed)a, (signed)b)
using namespace std;
signed main() {
int A;
cin >> A;
string s = "";
long long temp = A;
char alphabets[27];
alphabets[0] = 'Z';
for (int i = 1; i < 27; i++) {
alpha... | #include <bits/stdc++.h>
#define int long long
#define max(a, b) max((signed)a, (signed)b)
#define mn(a, b) min((signed)a, (signed)b)
using namespace std;
signed main() {
int A;
cin >> A;
string s = "";
long long temp = A;
char alphabets[27];
alphabets[0] = 'z';
for (int i = 1; i < 27; i++) {
alpha... | [["-", 8, 9, 0, 1, 0, 11, 12, 103, 0, 125], ["+", 8, 9, 0, 1, 0, 11, 12, 103, 0, 125]] | 1 | 161 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
using ll = long long;
int main(void) {
ll N;
cin >> N;
ll N_bina = 0;
string ans;
string alphabet = "0abcdefghijklmnopqrstuvwxyz";
for (int i = 0; N > 0; i++) {
N_bina = N_bina + (N % 26) * pow(10, i);
... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
using ll = long long;
int main(void) {
ll N;
cin >> N;
ll N_bina = 0;
string ans;
string alphabet = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; N > 0; i++) {
N--;
N_bina = N_bina + (N % 26) * pow(10,... | [["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 115 |
package main
import (
"fmt"
"strings"
)
func main() {
var n int64
fmt.Scanf("%d", &n)
alphabets := strings.Split("zabcdefghijklnmopqrstuvwxy", "")
var answer string
for {
answer += alphabets[n%26]
if n%26 == 0 {
n--
}
if n/26 == 0 {
break
} else {
n = n / 26
}
}
fmt.Println(reverse(... | package main
import (
"fmt"
"strings"
)
func main() {
var n uint64
fmt.Scanf("%d", &n)
alphabets := strings.Split("zabcdefghijklmnopqrstuvwxy", "")
var answer string
for {
answer += alphabets[n%26]
if n%26 == 0 {
n--
}
if n/26 == 0 {
break
} else {
n = n / 26
}
}
fmt.Println(reverse... | [["-", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["+", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["+", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165]] | 7 | 188 |
N = int(input())
ans = []
while N > 26:
if N % 26 == 0:
ans.append(chr(122))
N = N // 26-1
else:
ans.insert(0,chr(N%26+96))
N = N // 26
ans.insert(0,chr(N+96))
print("".join(ans)) | N = int(input())
ans = []
while N > 26:
if N % 26 == 0:
ans.insert(0,chr(122))
N = N // 26-1
else:
ans.insert(0,chr(N%26+96))
N = N // 26
ans.insert(0,chr(N+96))
print("".join(ans)) | [["-", 64, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21]] | 5 | 85 |
N = int(input())
alphabet = "zabcdefghijklmnopqrstuvwxy"
num = N
cnt = 0
div = 26
res = ""
while True:
# print(num, div)
sho = num // div
amari = num % div
# print(sho, amari, alphabet[amari])
# print("--")
res += alphabet[amari]
if amari != 0:
num = sho
else:
num = sho
div += 1
if sho == ... | N = int(input())
alphabet = "zabcdefghijklmnopqrstuvwxy"
num = N
cnt = 0
div = 26
res = ""
while True:
# print(num, div)
sho = num // div
amari = num % div
# print(sho, amari, alphabet[amari])
# print("--")
res += alphabet[amari]
if amari != 0:
num = sho
else:
num = sho -1
if sho == 0:
bre... | [["-", 75, 76, 8, 196, 0, 1, 0, 677, 31, 22], ["-", 75, 76, 8, 196, 0, 1, 0, 677, 17, 107], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33]] | 5 | 99 |
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
String ans = "";
while (n > 0) {
if (n % 26 == 1) {
ans = 'a' + ans;
n = n / ... | import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
String ans = "";
while (n > 0) {
if (n % 26 == 1) {
ans = 'a' + ans;
n = n / ... | [["+", 64, 196, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 196, 0, 1, 0, 11, 12, 16, 12, 499]] | 3 | 678 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int64_t m = 26;
if (n == 1) {
cout << 'a' << endl;
}
int a = 11;
vector<char> x(a);
for (int i = 0; i < a; i++) {
if (n == 0) {
break;
}
if (n % m != 0) {
x.at(i) = n % m + 96;
n = (n - n %... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int64_t m = 26;
if (n == 1) {
cout << 'a' << endl;
return 0;
}
int a = 12;
vector<char> x(a);
for (int i = 0; i < a; i++) {
if (n == 0) {
break;
}
if (n % m != 0) {
x.at(i) = n % m + 96;
... | [["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 221 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
int len = 0;
long l, m = 0;
while (l < n) {
len += 1;
l += pow(26, len);
if (l >= n) {
break;
}
m = l;
}
string ans;
char a;
for (int i = 1; i <=... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
using namespace std;
int main() {
long n;
cin >> n;
long len = 0;
long l = 0;
long m = 0;
while (l < n) {
len += 1;
l += pow(26, len);
if (l >= n) {
break;
}
m = l;
}
string ans;
char a;
for (in... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 163 |
N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
while N > 0:
if N%26 == 0:
amari = 26
else:
amari = N%26
if N > 26:
N = (N-N%26)/26
else:
N = N-26
s = words[int(amari-1)]+s
print(s) | N = int(input())
s = ""
words = "abcdefghijklmnopqrstuvwxyz"
while N > 0:
if N%26 == 0:
amari = 26
else:
amari = N%26
if N > 26:
N = (N-amari)/26
else:
N = N-26
s = words[int(amari-1)]+s
print(s) | [["-", 12, 657, 31, 23, 0, 657, 12, 657, 31, 22], ["-", 12, 657, 31, 23, 0, 657, 12, 657, 17, 109], ["-", 12, 657, 31, 23, 0, 657, 12, 657, 12, 612], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 22]] | 5 | 79 |
x = int(input())
alphbet = lambda c: chr(c+64)
def Base_10_to_n(X, n):
X_dumy = X
out = []
while X_dumy > 0:
if X_dumy % n == 0:
out.append( 26 )
X_dumy = int(X_dumy / n - 1)
print(X_dumy)
else:
out.append( X_dumy % n )
X_dumy = int(X_dumy / n)
retur... | x = int(input())
alphbet = lambda c: chr(c+64)
def Base_10_to_n(X, n):
X_dumy = X
out = []
while X_dumy > 0:
if X_dumy % n == 0:
out.append( 26 )
X_dumy = int(X_dumy / n - 1)
else:
out.append( X_dumy % n )
X_dumy = int(X_dumy / n)
return out
if 1 <= x <= 100... | [["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 128 |
n = int(input())
ans = ''
while True:
q, mod = divmod(n, 26)
if mod == 0:
ans = 'z' + ans
else:
ans = (chr(ord('a') + mod-1)) + ans
if q == 0:
break
else:
n = q
print(ans)
| n = int(input())
ans = ''
while True:
q, mod = divmod(n, 26)
if mod == 0:
ans = 'z' + ans
q -= 1
else:
ans = (chr(ord('a') + mod-1)) + ans
if q == 0:
break
else:
n = q
print(ans)
| [["+", 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 | 73 |
num = int(input())
strng = ""
while num >= 1 :
kalan = num % 26
if(kalan==0):
strng = "z" +strng
else:
strng = chr(96+kalan)+strng
num = num // 26
print(strng) | num = int(input())
strng = ""
while num >= 1 :
kalan = num % 26
if(kalan==0):
strng = "z" +strng
else:
strng = chr(96+kalan)+strng
num-=1
num = num // 26
print(strng) | [["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 52, 8, 196, 0, 1, 0, 662, 31, 22]] | 5 | 57 |
#include <iostream>
#include <string>
using namespace std;
int main()
{
long long n;
cin >> n;
string s = "", s1 = "z";
for (char i = 'a'; i < 'z'; i++)
s1 += i;
if (n == 26)
cout << 'z';
else if (n < 26)
cout << s1[n];
else
{
while (n > 0)
{
int k = (n % 26);... | #include <iostream>
#include <string>
using namespace std;
int main()
{
long long n;
cin >> n;
string s = "", s1 = "z";
for (char i = 'a'; i < 'z'; i++)
s1 += i;
if (n == 26)
cout << 'z';
else if (n < 26)
cout << s1[n];
else
{
while (n > 0)
{
int k = (n % 26);
... | [["+", 0, 52, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 144 |
n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
sakai=[]
k=0
for i in range(10):
k+=26**(i+1)
sakai.append(k)
if n<=26:
n-=1
u=1
elif n>sakai[9]:
n-=sakai[9]+1
u=11
for i in range(9):
if (sakai[i]<n<=sakai[i+1]):
n-=sakai[i]+1
u=i+2
def base(n):
ans=[]
while(n>26):
r=n%26
n=... | n=int(input())
al=[chr(ord('a') + i) for i in range(26)]
sakai=[]
k=0
for i in range(10):
k+=26**(i+1)
sakai.append(k)
if n<=26:
n-=1
u=1
elif n>sakai[9]:
n-=sakai[9]+1
u=11
for i in range(9):
if (sakai[i]<n<=sakai[i+1]):
n-=sakai[i]+1
u=i+2
def base(n):
ans=[]
while(n>=26):
r=n%26
n... | [["-", 8, 196, 0, 52, 15, 23, 0, 666, 667, 47], ["+", 8, 196, 0, 52, 15, 23, 0, 666, 667, 20]] | 5 | 298 |
import java.lang.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.next();
long num = Long.parseLong(str);
num--;
ArrayList<Long> list = new ArrayList<>();
while (true) {
list.add(0, num % 26)... | import java.lang.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.next();
long num = Long.parseLong(str);
num--;
ArrayList<Long> list = new ArrayList<>();
while (true) {
list.add(0, num % 26)... | [["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 45], ["+", 0, 57, 75, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 57, 75, 196, 0, 1, 0, 27, 0, 68], ["+", 8, 196, 0, 57, 75, 196, 0, 1, 0, 35], ["+", 0, 52, 8, 196, 0, 57, 75, 196, 0, 46]] | 3 | 142 |
#include <bits/stdc++.h>
#define REP(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define FOR(i, b, e) for (int(i) = (b); (i) < (e); ++(i))
#define ALL(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << "\n"
using namespace std;
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
template <t... | #include <bits/stdc++.h>
#define REP(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define FOR(i, b, e) for (int(i) = (b); (i) < (e); ++(i))
#define ALL(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << "\n"
using namespace std;
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
template <t... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 33], ["-", 0, 52, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]] | 1 | 242 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
int k;
string q = "abcdefghijklmnopqrstuvwxyz";
string ans = "";
while (1) {
k = n % 26;
if (k != 0)
ans += q[k - 1];
if (k == 0)
ans += "z";
if (n <= 26)
break;
n /= 26;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
int k;
string q = "abcdefghijklmnopqrstuvwxyz";
string ans = "";
while (1) {
k = n % 26;
if (k != 0)
ans += q[k - 1];
if (k == 0) {
ans += "z";
--n;
}
if (n <= 26)
br... | [["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 112 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
//文字コード 最終的にsort
vector<long long> name;
while (n != 0LL) {
name.push_back((n - 1LL) % 26LL);
n = (n - 1LL) / 26LL;
}
sort(name.begin(), name.end());
string ans = "";
for (int i = 0; i < name.size(); i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
//文字コード 最終的にsort
vector<long long> name;
while (n != 0LL) {
name.push_back((n - 1LL) % 26LL);
n = (n - 1LL) / 26LL;
}
reverse(name.begin(), name.end());
string ans = "";
for (int i = 0; i < name.size(); i++) {
... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]] | 1 | 124 |
n = int(input()) - 1
num = 1
while 26**num < n:
n -= 26**num
num += 1
r = []
while 25 < n:
r.append(n % 26)
n //= 26
r.append(n)
if len(r) < num:
for i in range(num - len(r)):
r.append(0)
for i in r[::-1]:
print(chr(97+i), end='') | n = int(input()) - 1
num = 1
while 26**num <= n:
n -= 26**num
num += 1
r = []
while 25 < n:
r.append(n % 26)
n //= 26
r.append(n)
if len(r) < num:
for i in range(num - len(r)):
r.append(0)
for i in r[::-1]:
print(chr(97+i), end='') | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 19]] | 5 | 106 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
void printString(long long int n) {
char str[INT_MAX]; // To store result (Excel column name)
long long int i = 0; // To store current index in str which is result
while (n > 0) {
// Find remainder
long long int rem = n % 26;
// If ... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
void printString(long long int n) {
char str[100000]; // To store result (Excel column name)
long long int i = 0; // To store current index in str which is result
while (n > 0) {
// Find remainder
long long int rem = n % 26;
// If ... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22]] | 1 | 158 |
#include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
Apparently, the tree supports the same operations as the set
(at least I haven't any problems with them before), but also there are two new
features — find_by_order() — The first returns an iter... | #include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
Apparently, the tree supports the same operations as the set
(at least I haven't any problems with them before), but also there are two new
features — find_by_order() — The first returns an iter... | [["+", 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 | 220 |
n = int(input())
su=[26**i for i in range(1,20)]
from itertools import accumulate
wa = list(accumulate(su))
import bisect
c = 0
n = n-1
if n>26:
c=bisect.bisect_left(wa, n)
n=n-wa[c-1]
m = n
k=26
bi=[]
for i in range(c+1):
bi.append(n % k)
n = (n-n%k)//k
print(bi)
al=[chr(ord('a') + i) for i ... | n = int(input())
su=[26**i for i in range(1,20)]
from itertools import accumulate
wa = list(accumulate(su))
import bisect
c = 0
n = n-1
if n>26:
c=bisect.bisect_left(wa, n)
n=n-wa[c-1]
m = n
k=26
bi=[]
for i in range(c+1):
bi.append(n % k)
n = (n-n%k)//k
al=[chr(ord('a') + i) for i in ... | [["-", 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 | 180 |
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
long long n;
cin >> n;
deque<string> d;
// vector<string>
// c{'0','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'};
string c = "0abcdefghijklmnopqrst... | #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
long long n;
cin >> n;
deque<string> d;
// vector<string>
// c{'0','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'};
string c = "0abcdefghijklmnopqrst... | [["+", 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 | 112 |
let main =
(input) => {
let id = parseInt(input)
let output = ""
for (let result = id; result != 0; result = Math.floor(result / 26)) {
let which = result % 26
if (which == 0) {
which = 10
}
output = String.fromCharCode(97 + which - 1) + output
}
... | let main =
(input) => {
let id = parseInt(input)
let output = ""
for (let result = id; result != 0; result = Math.floor(result / 26)) {
let which = result % 26
if (which == 0) {
which = 26
result = result - 26
}
output = String.fromCharCode(97 + ... | [["-", 0, 57, 64, 556, 0, 1, 0, 11, 12, 555], ["+", 0, 57, 64, 556, 0, 1, 0, 11, 12, 555], ["+", 0, 57, 64, 556, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 556, 0, 1, 0, 11, 0, 32], ["+", 64, 556, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 64, 556, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 556, 0, 1, 0, 11, 12, 16, 12, 555]] | 2 | 102 |
#include "bits/stdc++.h"
#define rep(i, N) for (int i = 0; i < N; i++)
typedef long long ll;
const int mod = 1e9 + 7;
using namespace std;
int main(void) {
ll N;
cin >> N;
vector<int> x;
while (N != 0) {
x.push_back(N % 26);
N /= 26;
}
string s = "";
rep(i, (int)x.size() - 1) {
if (x[... | #include "bits/stdc++.h"
#define rep(i, N) for (int i = 0; i < N; i++)
typedef long long ll;
const int mod = 1e9 + 7;
using namespace std;
int main(void) {
ll N;
cin >> N;
vector<int> x;
while (N != 0) {
x.push_back(N % 26);
N /= 26;
}
string s = "";
rep(i, (int)x.size() - 1) {
if (x[... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 219 |
n = 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)
x = num2alpha(n)
print(x.upper()) | n = 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)
x = num2alpha(n)
print(x.lower()) | [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 79 |
//****************************//
/********** main *************/
//****************************//
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#in... | //****************************//
/********** main *************/
//****************************//
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#in... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 264 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef map<ll, ll> ml;
#define modulo 1000000007
#define maxN 10000001
#define PI 3.14159265
#define fast ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef map<ll, ll> ml;
#define modulo 1000000007
#define maxN 10000001
#define PI 3.14159265
#define fast ... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]] | 1 | 177 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
int a[20], m = 0;
cin >> n;
memset(a, 0, sizeof(a));
while (n) {
if (n % 26)
a[m++] += n % 26;
else {
a[m++] += 26;
a[m] = -1;
}
n /= 26;
}
for (int i = m - 1; i >= 0; i--)
if (a[i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
int a[20], m = 0;
cin >> n;
memset(a, 0, sizeof(a));
while (n) {
if (n % 26)
a[m++] += n % 26;
else {
a[m++] += 26;
n--;
}
n /= 26;
}
for (int i = m - 1; i >= 0; i--)
if (a[i])
... | [["-", 0, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 9, 0, 1, 0, 27, 28, 22], ["+", 75, 76, 0,... | 1 | 136 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long n;
cin >> n;
string res;
while (n > 0) {
if (n % 26 == 1) {
res += 'a';
n -= 1;
n /= 26;
} else if (n % 26 == 2) {
res += 'b';
n -= 2;
n /= 26;
} else if (n % 26 == 3) {
res += 'c';
n -... | #include <bits/stdc++.h>
using namespace std;
int main() {
long n;
cin >> n;
string res;
while (n > 0) {
if (n % 26 == 1) {
res += 'a';
n -= 1;
n /= 26;
} else if (n % 26 == 2) {
res += 'b';
n -= 2;
n /= 26;
} else if (n % 26 == 3) {
res += 'c';
n -... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 692 |
import math
from typing import List, NoReturn, Tuple
def main() -> NoReturn:
n: int = int(input())
# 0.9615384615384616 == 25 / 26
group: int = math.ceil(math.log(0.9615384615384616 * n + 1, 26))
in_group_index: int = n - (26 * (26 ** (group - 1) - 1)) // 25
alphabet_num: List[int] = []
alpha... | import math
from typing import List, NoReturn, Tuple
def main() -> NoReturn:
n: int = int(input())
# 0.9615384615384616 == 25 / 26
group: int = math.ceil(math.log(0.9615384615384616 * n + 1, 26))
in_group_index: int = n - 1 - (26 * (26 ** (group - 1) - 1)) // 25
alphabet_num: List[int] = []
a... | [["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 662, 12, 658, 8, 206, 206, 657, 17, 33], ["-", 0, 662, 12, 658, 8, 206, 206, 657, 12, 612]] | 5 | 163 |
#include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
using ll = long long;
const int INF = 1 << 30;
const ll INFll = 1LL << 62;
const int mod = int(1e9) + 7;
using P = pair<ll, ll>;
using ld = long double;
int main() {
ll n;
cin >> n;
string ans = "";
int k = (n % 26) ? n % 26 : 26;... | #include <bits/stdc++.h>
using namespace std;
#define all(a) a.begin(), a.end()
using ll = long long;
const int INF = 1 << 30;
const ll INFll = 1LL << 62;
const int mod = int(1e9) + 7;
using P = pair<ll, ll>;
using ld = long double;
int main() {
ll n;
cin >> n;
string ans = "";
int k = (n % 26) ? n % 26 : 26;... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 12, 13]] | 1 | 175 |
n = int(input())
s = ""
t = 26
c = ['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']
while n > 0:
s += c[int(n%t)]
n //= 26
print(s[::-1]) | n = int(input())
s = ""
t = 26
c = ['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']
while n > 0:
s += c[int(n%t)]
n -= 1
n //= 26
print(s[::-1])
| [["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 31, 22]] | 5 | 151 |
s=int(input())-1
d=[]
while s>0:
d.append(chr(s%26+97))
s//=26
t=''
for i in reversed(d):
t+=i
print(t) | s=int(input())-1
d=[]
while s>=0:
d.append(chr(s%26+97))
s//=26
s-=1
t=''
for i in reversed(d):
t+=i
print(t) | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 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 | 54 |
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long double pi = acos(-1.0);
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
vector<char> v;
while (n > 0) {
int m = n % 26;
n = n / 26;
if (m == 0) {
n -= 1;
... | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long double pi = acos(-1.0);
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
vector<char> v;
while (n > 0) {
int m = n % 26;
n = n / 26;
if (m == 0) {
n -= 1;
... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13]] | 1 | 145 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rng(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll n;
cin >> n;
string s;
while (n > 0) {
s += n % 26 - 1 + 'a';
n /= 26;
}
reverse(rng(s));
cout << s << en... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rng(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll n;
cin >> n;
string s;
while (n > 0) {
n--;
s += n % 26 + 'a';
n /= 26;
}
reverse(rng(s));
cout << s ... | [["+", 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, 16, 31, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13]] | 1 | 93 |
n=int(input())
while n>=0:
n=n-1 ##for tracking last character
z+= chr( n%26 + ord('a') )
n=n//26
print(z[::-1])
| n=int(input())
z=""
while n>0:
n=n-1 ##for tracking last character
z+= chr( n%26 + ord('a') )
n=n//26
print(z[::-1])
| [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 654], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 655], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47]] | 5 | 49 |
n=int(input())-1
ans=''
last=0
keta=1
while True:
if last+26**keta>n:
for i in range(keta):
idx=n%26
n//=26
ans+=chr(97+idx)
break
n-=26**keta
keta+=1
print(ans) | n=int(input())-1
ans=''
last=0
keta=1
while True:
if last+26**keta>n:
for i in range(keta):
idx=n%26
n//=26
ans+=chr(97+idx)
break
n-=26**keta
keta+=1
print(ans[::-1]) | [["+", 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 | 69 |
#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define rep2(i, n) for (int i = 0; i <= n; i++)
#define repr(i, a, n) for (int i = a; i < n; i++)
#define... | #pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define rep2(i, n) for (int i = 0; i <= n; i++)
#define repr(i, a, n) for (int i = a; i < n; i++)
#define... | [["-", 31, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 75, 76, 0, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 1,054 |
alphabet = 'aabcdefghijklmnopqrstuvwxyz'
N =int(input())
name = ''
while N > 0:
n = N % 26
N = N//26
if n == 0:
name += 'z'
else:
name += alphabet[n]
new_name = name[::-1]
print(new_name)
| alphabet = 'aabcdefghijklmnopqrstuvwxy'
N =int(input())
name = ''
while N > 0:
n = N % 26
N = N // 26
if n == 0:
name += 'z'
N = N-1
else:
name += alphabet[n]
new_name = name[::-1]
print(new_name) | [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 63 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
c... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define vvi vector<vector<int>>
#define all(a) (a).begin(), (a).end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
c... | [["-", 0, 7, 26, 34, 12, 11, 12, 16, 31, 22], ["+", 0, 7, 26, 34, 12, 11, 12, 16, 31, 13]] | 1 | 254 |
N = int(input())
l = []
while N:
l.append(chr(96+(N % 26)))
N //= 26
print("".join(l[::-1])) | N = int(input())
l = []
while N:
N -= 1
l.append(chr(97+(N % 26)))
N //= 26
print("".join(l[::-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], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 612]] | 5 | 49 |
num = int(input())
num2alpha = lambda c: chr(c+96)
ans = []
newans = []
string = ''
while num > 0:
if num % 26 == 0:
ans.append(26)
else:
ans.append(num%26)
if num < 27:
break
num = int(int(num) / 26)
for item in ans:
newans.append(num2alpha(item))
for item in rever... | num = int(input())
num2alpha = lambda c: chr(c+96)
ans = []
newans = []
string = ''
while num > 0:
if num % 26 == 0:
ans.append(26)
else:
ans.append(num%26)
if num < 27:
break
num = int((int(num) - 1) / 26)
for item in ans:
newans.append(num2alpha(item))
for item in... | [["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 31, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]] | 5 | 107 |
from sys import stdin
def Base_10_to_n(X, n):
if X == 26:
return "z"
alpha = "zabcdefghijklmnopqrstuvwxy"
X_dumy = X
out = ''
while X_dumy>0:
amari = X_dumy%n
if amari == 0:
new = alpha[amari]
out = new+out
X_dumy = int(X_dumy/n)-1
... | from sys import stdin
def Base_10_to_n(X, n):
if X == 26:
return "z"
alpha = "zabcdefghijklmnopqrstuvwxy"
X_dumy = X
out = ''
while X_dumy>0:
amari = X_dumy%n
if amari == 0:
new = alpha[amari]
out = new+out
X_dumy = int(X_dumy/n)-1
... | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612]] | 5 | 132 |
a = "zabcdefghijklmnopqrstuvwxy"
number = int(input())
result = ""
for i in range(13):
result += a[int(number % 26)]
if number % 26 == 0:
number -= 26
if number // 26 == 0:
break
number /= 26
result = result[::-1]
print(result) | a = "zabcdefghijklmnopqrstuvwxy"
number = int(input())
result = ""
for i in range(13):
result += a[int(number % 26)]
if number % 26 == 0:
number -= 26
if number // 26 == 0:
break
number = number // 26
result = result[::-1]
print(result) | [["-", 0, 7, 8, 196, 0, 1, 0, 677, 17, 90], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676]] | 5 | 70 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
#define sz(x) int(x.size())
using ll = long long;
using P = pair<int, int>;
const ll LLINF = numeric_limits<long long>::max();
const int mod =... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP2(i, x, n) for (int i = x; i < (n); i++)
#define ALL(n) begin(n), end(n)
#define sz(x) int(x.size())
using ll = long long;
using P = pair<int, int>;
const ll LLINF = numeric_limits<long long>::max();
const int mod =... | [["+", 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 | 165 |
import string
def main():
alpha = string.ascii_lowercase
def to_n(X, n, list_=[]):
X_dumy = X
while X_dumy > 0:
list_.insert(0, X_dumy % n)
X_dumy = int(X_dumy/n)
return list_
N = int(input())
res = N
counter = 0
while res > 0:
counter += 1
res -= 26**counter
res += 26... | import string
def main():
alpha = string.ascii_lowercase
def to_n(X, n, list_=[]):
X_dumy = X
while X_dumy > 0:
list_.insert(0, X_dumy % n)
X_dumy = int(X_dumy/n)
return list_
N = int(input())
res = N
counter = 0
while res > 0:
counter += 1
res -= 26**counter
res += 26... | [["-", 0, 656, 0, 14, 8, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 14, 8, 196, 0, 52, 0, 89]] | 5 | 157 |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long N;
cin >> N;
long long X, Y;
bool flag = true;
X = N - 1;
vector<char> res;
while (flag) {
Y = X % 26;
res.push_back('a' + Y);
X = X / 26;
if (X < 26) {
if (X != 0) {
res.push... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long N;
cin >> N;
long long X, Y;
bool flag = true;
X = N - 1;
vector<char> res;
while (flag) {
Y = X % 26;
res.push_back('a' + Y);
X = (X / 26) - 1;
if (X < 26) {
if (X >= 0) {
re... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 138 |
n = int(input())
res = ''
while n > 1:
res='zabcdefghijklmnopqrstuvwxy'[n%26]+res
n=n//26
print(res)
| n = int(input())
res = ''
while n > 0:
n-=1
res='abcdefghijklmnopqrstuvwxyz'[n%26]+res
n=n//26
print(res) | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 0, 612], ["+", 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, 662, 12, 657, 31, 206, 51, 557, 0, 6], ["+", 0, 662, 12, 657, 31, 206, 51, 557, 0,... | 5 | 38 |
n = int(input())
result = ""
while True:
alpha = int(n % 26)
if alpha == 0:
result += "z"
else:
result += chr(alpha + 96)
if n/26 <= 1:
break
n /= 26
rslt = result[::-1]
print(rslt) | n = int(input())
result = ""
while True:
alpha = int(n % 26)
if alpha == 0:
result += "z"
n -= 1
else:
result += chr(alpha + 96)
if n/26 < 1:
break
n /= 26
rslt = result[::-1]
print(rslt)
| [["+", 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], ["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 67 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.