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 |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
#define fo(i, a, n) for (i = a; i < n; i++)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sorta... | #include <bits/stdc++.h>
using namespace std;
#define fo(i, a, n) for (i = a; i < n; i++)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sorta... | [["+", 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, 12, 13], ["+", 12, 74, 51, 23, 0, 16, 12, 103, 0, 104], ["+", 12, 74, 51, 23, 0, 16, 12, 103, 0, 125]] | 1 | 260 |
n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
ans += str(a[n%26 - 1])
n //= 26
print(ans[::-1]) | n = int(input())
a = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while n > 0:
ans += str(a[n%26- 1])
n -= 1
n //= 26
print(ans[::-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 | 48 |
N = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz" # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします
n_rem = n # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = ""
while True:
x = n_rem % 26
if x == 0:
x = 26
res += chars[x]
n_rem -= x
if n_rem == 0:
break
n_rem //= 26
print(res[::-1]) | n = int(input())
chars = "Xabcdefghijklmnopqrstuvwxyz" # x番目がほしいときにchars[x-1]としたくないので、chars[0]は使わないことにします
n_rem = n # 入力を直接操作すると、もし後々必要になったときに面倒なので
res = ""
while True:
x = n_rem % 26
if x == 0:
x = 26
res += chars[x]
n_rem -= x
if n_rem == 0:
break
n_rem //= 26
print(res[::-1]) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22]] | 5 | 66 |
N=int(input())
abc=[chr(i) for i in range(97, 97+26)]
ans=""
while N>0:
ans+=(abc[N%26-1])
N//=26
print(ans[::-1]) | N=int(input())
abc=[chr(i) for i in range(97, 97+26)]
ans=""
while N>0:
N-=1
ans+=(abc[N%26])
N//=26
print(ans[::-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], ["-", 0, 677, 12, 23, 0, 206, 206, 657, 17, 33], ["-", 0, 677, 12, 23, 0, 206, 206, 657, 12, 612]] | 5 | 61 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
long long n;
cin >> n;
string t = "";
while (n > 0) {
t += 'a' + n % 26 - 1;
n /= 26;
}
for (int i = t.size() - 1; i >= 0; i--) {
cout << t[i];
}
}
| #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
long long n;
cin >> n;
string t = "";
while (n > 0) {
n--;
t += 'a' + n % 26;
n /= 26;
}
for (int i = t.size() - 1; i >= 0; i--) {
cout << t[i];
}
}
| [["+", 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 | 84 |
n = int(input())
a = []
while n > 0:
n -= 1
a.append(n%26)
n = n // 26
ans = ""
print(a)
for i in range(len(a)):
ans += chr(ord("a")+a[(-1)*(i+1)])
print(ans) | n = int(input())
a = []
while n > 0:
n -= 1
a.append(n%26)
n = n // 26
ans = ""
for i in range(len(a)):
ans += chr(ord("a")+a[(-1)*(i+1)])
print(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 | 81 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
long long n;
cin >> n;
vector<int> ans;
while (n != 0) {
ans.emplace_back(n % 26);
n /= 26;
}
for (int i = ans.size() - 1; i >= 0; i--) {
cout << (char)(ans[i] + 'a' - 1);
}
cout << endl;
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
long long n;
cin >> n;
vector<int> ans;
while (n != 0) {
n--;
ans.emplace_back(n % 26);
n /= 26;
}
for (int i = ans.size() - 1; i >= 0; i--) {
cout << (char)(ans[i] + 'a');
}
cout << endl;
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], ["-", 0, 16, 12, 74, 51, 23, 0, 16, 17, 33], ["-", 0, 16, 12, 74, 51, 23, 0, 16, 12, 13]] | 1 | 96 |
#include "algorithm"
#include "iostream"
#include <vector>
//#define l long long int
typedef long long int l;
using namespace std;
// column name to number
// number to column name
int main() {
vector<int> v;
l n;
cin >> n;
while (n > 0) {
if (n % 26 == 0)
v.push_back(26); // to avoid 26/26=1(a),infa... | #include "algorithm"
#include "iostream"
#include <vector>
//#define l long long int
typedef long long int l;
using namespace std;
// column name to number
// number to column name
int main() {
vector<int> v;
l n;
cin >> n;
while (n > 0) {
if (n % 26 == 0)
v.push_back(26); // to avoid 26/26=1(a),infa... | [["-", 8, 9, 0, 338, 8, 1, 0, 16, 17, 151], ["-", 0, 338, 8, 1, 0, 16, 12, 5, 0, 62], ["-", 0, 338, 8, 1, 0, 16, 12, 5, 0, 6]] | 1 | 137 |
/*
Author :- Gaurang_Kothiya
Quote :- " Practice makes a man perfect. "
*/
#include <bits/stdc++.h>
#include <bitset>
#include <cstdint>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <initializer_list>
using namespace std;
using namespace... | /*
Author :- Gaurang_Kothiya
Quote :- " Practice makes a man perfect. "
*/
#include <bits/stdc++.h>
#include <bitset>
#include <cstdint>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <initializer_list>
using namespace std;
using namespace... | [["-", 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 | 303 |
n = int(input())
ans = ''
while n:
n -= 1
alphabet = chr(ord('a') + n % 26)
ans += alphabet
n //= 26
print(ans[::1]) | n = int(input())
ans = ''
while n:
n -= 1
alphabet = chr(ord('a') + n % 26)
ans += alphabet
n //= 26
print(ans[::-1]) | [["+", 3, 4, 0, 206, 206, 663, 0, 664, 17, 33]] | 5 | 48 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | [["+", 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 | 910 |
abc171c
n=int(input())
s=''
while n:
n-=1
s+=chr(n%26+97)
n//=26
print(s[::-1])
| #abc171c
n=int(input())
s=''
while n:
n-=1
s+=chr(n%26+97)
n//=26
print(s[::-1])
| [["-", 36, 36, 36, 36, 0, 656, 0, 1, 0, 22]] | 5 | 42 |
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *
input = sys.stdin.readline
def inputInt(): return int(input())
def inputMap(): return map(int, in... | # -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *
input = sys.stdin.readline
def inputInt(): return int(input())
def inputMap(): return map(int, in... | [["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22]] | 5 | 204 |
n = int(input())-1
ans = []
while n >= 0:
n, y = divmod(n, 26)
ans.append(y)
n -= 1
ans.reverse()
print(ans)
def to_alpha(x):
return chr(x+ord('a'))
print(''.join(map(to_alpha, ans))) | n = int(input())-1
ans = []
while n >= 0:
n, y = divmod(n, 26)
ans.append(y)
n -= 1
ans.reverse()
def to_alpha(x):
return chr(x+ord('a'))
print(''.join(map(to_alpha, 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 | 80 |
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
ll n;
cin >> n;
int bit[100] = {};
int p = 0;
while (n) {
bit[p++] = n % 26;
n /= 26;
}
for (int i = p - 1; i >= 0; i--)
cout << char(bit[i] + 'a' - 1);
} | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
int main() {
ll n;
cin >> n;
int bit[100] = {};
int p = 0;
while (n) {
bit[p++] = (--n) % 26;
n /= 26;
}
for (int i = p - 1; i >= 0; i--)
cout << char(bit[i] + 'a');
} | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 27, 17, 68], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 91 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define MOD 1000000007LL
ull n;
int main() {
int c[100];
int i, j;
ull x = 26;
cin >> n;
for (i ... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define MOD 1000000007LL
ull n;
int main() {
int c[100];
int i, j;
ull x = 26;
cin >> n;
for (i ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 160 |
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#incl... | #include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#incl... | [["+", 31, 69, 341, 342, 0, 16, 31, 16, 31, 22], ["+", 31, 69, 341, 342, 0, 16, 31, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 308 |
package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
var res []byte
for n > 0 {
rem := n % 26
n /= 26
res = append(res, byte(rem)+'a'-1)
}
Reverse(res)
fmt.Println(string(res))
}
func Reverse(s []byte) {
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
s[i], s[j] = s[j], s[i]
}
}
| package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
var res []byte
for n > 0 {
n -= 1
rem := n % 26
n /= 26
res = append(res, byte(rem)+'a')
}
Reverse(res)
fmt.Println(string(res))
}
func Reverse(s []byte) {
for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 {
s[i], s[j] = s[j], s[i]
}
}... | [["+", 0, 7, 8, 196, 0, 436, 31, 432, 0, 22], ["+", 8, 196, 0, 7, 8, 196, 0, 436, 17, 110], ["+", 0, 7, 8, 196, 0, 436, 12, 432, 0, 433], ["+", 0, 435, 8, 196, 0, 7, 8, 196, 0, 165], ["-", 12, 432, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 12, 432, 0, 2, 3, 4, 0, 16, 12, 433]] | 7 | 144 |
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = []
while(N>26):
s = N % 26
if s == 0:
A.append(26)
N = (N-26) // 26
else:
N = (N-s) // 26
A.append(N)
A = A[::-1]
ans = ''
d = ['a','b','c','d','e','... | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
A = []
while(N>26):
s = N % 26
if s == 0:
A.append(26)
N = (N-26) // 26
else:
A.append(s)
N = (N-s) // 26
A.append(N)
A = A[::-1]
ans = ''
d = ['a'... | [["+", 8, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 8, 196, 0, 1, 0, 652, 63, 319, 319, 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, 25]] | 5 | 227 |
#include <bits/stdc++.h>
using namespace std;
string sub(long n, int k) {
vector<int> v;
for (int i = 0; i < k; ++i) {
v.push_back(n % 26);
n /= 26;
}
reverse(v.begin(), v.end());
string r;
for (int i = 0; i < k; ++i) {
r += v[i] + 'a';
}
return r;
}
int main() {
long n;
cin >> n;
i... | #include <bits/stdc++.h>
using namespace std;
string sub(long n, int k) {
vector<int> v;
for (int i = 0; i < k; ++i) {
v.push_back(n % 26);
n /= 26;
}
reverse(v.begin(), v.end());
string r;
for (int i = 0; i < k; ++i) {
r += v[i] + 'a';
}
return r;
}
int main() {
long n;
cin >> n;
i... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 173 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main() {
ll N;
cin >> N;
vector<char> name;
while (N > 0) {
ll c = N % 26L;
n... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main() {
ll N;
cin >> N;
vector<char> name;
while (N > 0) {
N--;
ll c = 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], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 115 |
#include <bits/stdc++.h>
#define pb push_back
#define Int int64_t
using namespace std;
int64_t N;
int main() {
cin >> N;
int64_t t = N;
string ans = "";
while (t > 0) {
int64_t rem = t % 26;
ans.pb(char(rem - 1 + 'a'));
t /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << "\n";
} | #include <bits/stdc++.h>
#define pb push_back
#define Int int64_t
using namespace std;
int64_t N;
int main() {
cin >> N;
int64_t t = N;
string ans = "";
while (t > 0) {
--t;
int64_t rem = t % 26;
ans.pb(char(rem + 'a'));
t /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << "\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, 2, 3, 4, 0, 16, 31, 16, 17, 33], ["-", 0, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 94 |
N = int(input())
al = ["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"]
ls =[]
while N > 0:
a = (N%26)-1
ls.append(al[a])
N = N // 26
print("".join(ls[::-1])) | N = int(input())
al = ["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"]
ls =[]
while N > 0:
N -= 1
a = (N%26)
ls.append(al[a])
N = N // 26
print("".join(ls[::-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], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 163 |
n = gets.to_i
s = []
while n > 0
s.unshift ("a".."z").to_a[n%26-1]
n /= 26
end
puts s*'' | n = gets.to_i
s = []
while n > 0
n -= 1
s.unshift ("a".."z").to_a[n%26]
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, 652, 3, 4, 0, 742, 0, 738, 17, 33], ["-", 0, 652, 3, 4, 0, 742, 0, 738, 12, 612]] | 4 | 43 |
import math
def main():
a = int(input())
ans = ''
for i in range(1, 99):
if a <= 26 ** 1:
a -= 1
for j in range(i):
ans += chr(ord('a') + a % 26)
a //= 26
break
else:
a -= 26 ** i
print(ans[::-1])
if __na... | def main():
a = int(input())
ans = ''
for i in range(1, 99):
if a <= 26 ** i:
a -= 1
for j in range(i):
ans += chr(ord('a') + a % 26)
a //= 26
break
else:
a -= 26 ** i
print(ans[::-1])
if __name__ == "__ma... | [["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["-", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]] | 5 | 93 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
string res = "";
while (N) {
--N;
res += (char)('a' + (N-- % 26));
N /= 26;
}
reverse(res.begin(), res.end());
cout << res;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long N;
cin >> N;
string res = "";
while (N) {
--N;
res += (char)('a' + (N % 26));
N /= 26;
}
reverse(res.begin(), res.end());
cout << res;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 16, 12, 23, 0, 16, 31, 27, 17, 68]] | 1 | 83 |
//
// AtCoder Beginner Contest 171
// C - One Quadrillion and One Dalmatians
//
#include <algorithm>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
... | //
// AtCoder Beginner Contest 171
// C - One Quadrillion and One Dalmatians
//
#include <algorithm>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 68]] | 1 | 253 |
n = gets.to_i
ans = ''
while n>0
n-=1
ans += (n%26+'a'.ord).chr
n/=26
end
puts ans | n = gets.to_i
ans = ''
while n>0
n-=1
ans += (n%26+'a'.ord).chr
n/=26
end
puts ans.reverse | [["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 735, 22]] | 4 | 37 |
list = [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']
num_list =[0]
for i in range(1,15):
num_list.append(26**i+num_list[i-1])
n = int(input())
i = 0
while True:
if num_list[i] >= n:
break
else:
i +=1
word = []
for j in range(i,... | list = [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']
num_list =[0]
for i in range(1,15):
num_list.append(26**i+num_list[i-1])
n = int(input())
i = 0
while True:
if num_list[i] >= n:
break
else:
i +=1
word = []
for j in range(i,... | [["+", 36, 36, 36, 36, 0, 656, 0, 52, 0, 89], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 15, 146], ["+", 36, 36, 36, 36, 0, 656, 0, 52, 0, 102], ["+", 0, 52, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 52, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 93, 0, 94]] | 5 | 333 |
N=int(input())
ans=''
alf='abcdefghijklmnopqrstuvwxyz'
while 1:
l = N%26
N = N//26
ans+=alf[l-1]
if N==0:
break
print(ans[::-1])
| N=int(input())
ans=''
alf='abcdefghijklmnopqrstuvwxyz'
#26進数
while 1:
N-=1
l = N%26
N = N//26
ans+=alf[l]
if N==0:
break
print(ans[::-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], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 17, 33], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 12, 612]] | 5 | 54 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
long long n, s[11];
cin >> n;
s[0] = 26;
int i;
for (i = 1; s[i - 1] < n; i++)
s[i] = s[i - 1] + pow(26, i + 1);
int a[i];
for (int j = 0; n > 0; j++) {
a[j] = n % 2... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
long long n, s[11];
cin >> n;
s[0] = 26;
int i;
for (i = 1; s[i - 1] < n; i++)
s[i] = s[i - 1] + pow(26, i + 1);
int a[i];
for (int j = 0; n > 0; j++) {
n--;
a[j... | [["+", 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], ["-", 8, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 8, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 151 |
#include <bits/stdc++.h>
#define FIN \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ii pair<int, int>
#define F fi... | #include <bits/stdc++.h>
#define FIN \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ii pair<int, int>
#define F fi... | [["+", 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], ["-", 31, 2, 3, 4, 0, 16, 31, 16, 17, 33], ["-", 31, 2, 3, 4, 0, 16, 31, 16, 12, 13]] | 1 | 218 |
def main():
n = int(input())
n -= 1
res = ''
while n > 0:
n, m = divmod(n, 26)
res += chr(97 + m)
n -= 1
print(res[::-1])
if __name__ == '__main__':
main()
| def main():
n = int(input())
n -= 1
res = ''
while n >= 0:
n, m = divmod(n, 26)
res += chr(97 + m)
n -= 1
print(res[::-1])
if __name__ == '__main__':
main()
| [["-", 0, 14, 8, 196, 0, 52, 15, 666, 667, 47], ["+", 0, 14, 8, 196, 0, 52, 15, 666, 667, 20]] | 5 | 66 |
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long l... | #include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0)
#define ll long l... | [["+", 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 | 145 |
/*
Created by Rahul Goel.
*/
/*******************************************************************************/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#incl... | /*
Created by Rahul Goel.
*/
/*******************************************************************************/
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#incl... | [["+", 0, 52, 8, 1, 0, 34, 31, 27, 28, 22], ["+", 0, 52, 8, 1, 0, 34, 31, 27, 17, 68], ["+", 8, 9, 0, 52, 8, 1, 0, 34, 0, 21], ["-", 0, 34, 31, 11, 12, 16, 31, 16, 17, 33], ["-", 0, 34, 31, 11, 12, 16, 31, 16, 12, 13]] | 1 | 371 |
N = int(input())
N -= 1
d = 26
for i in range(1,15):
if N >= d:
N -= d
d *= 26
else:
d //= 26
ans = ""
# for j in range(i):
# ans += chr(N // d + ord("a"))
# N %= d
# d //= 26
for j in range(i):
ans += chr(N % 26 +... | N = int(input())
N -= 1
d = 26
for i in range(1,15):
if N >= d:
N -= d
d *= 26
else:
d //= 26
ans = ""
# for j in range(i):
# ans += chr(N // d + ord("a"))
# N %= d
# d //= 26
for j in range(i):
ans += chr(N % 26 +... | [["+", 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 | 79 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i)
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define All(x) (x).begin(), (x).end()
#define rAll(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
string a... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i)
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define All(x) (x).begin(), (x).end()
#define rAll(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
int main() {
ll N;
cin >> N;
string 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], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 100 |
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, in... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef pair<int, in... | [["-", 0, 338, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 338, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 444 |
#include <bits/stdc++.h>
#define FOR(i, l, r) for (ll i = l; i < r; i++)
#define rep(i, N) FOR(i, 0, N)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<ll> vl;
const ll MOD = round(1e9 + 7);
int main() {
ll N;
cin >> N;
string ans;
ll m = 0;
ll tmp... | #include <bits/stdc++.h>
#define FOR(i, l, r) for (ll i = l; i < r; i++)
#define rep(i, N) FOR(i, 0, N)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<ll> vl;
const ll MOD = round(1e9 + 7);
int main() {
ll N;
cin >> N;
string ans;
ll m = 0;
ll tmp... | [["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 180 |
import math
def nextString(text, p):
if text[p] != 'z':
text[p] = chr(ord(text[p])+1)
return text
else:
text[p] = 'a'
nextString(text, p - 1)
n = int(input())
base = 26
digit = math.floor(math.log(1+(base-1)*n, base))
position = int(n - (base**digit - 1) / (base - 1))
txt ... | import math
def nextString(text, p):
if text[p] != 'z':
text[p] = chr(ord(text[p])+1)
return text
else:
text[p] = 'a'
nextString(text, p - 1)
n = int(input())
base = 26
digit = math.floor(math.log(1+(base-1)*n, base))
position = int(n - (base**digit - 1) / (base - 1))
txt ... | [["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 654], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 655], ["+", 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, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 170 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
#define F first
#define S second
#define def(x) cerr << #x << " is " << x << endl;
#define mod 1000000007
#define pb push_back
#define FOR(i, a, n) for (ll i = a; i < n; i++)
#define ios ... |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
#define F first
#define S second
#define def(x) cerr << #x << " is " << x << endl;
#define mod 1000000007
#define pb push_back
#define FOR(i, a, n) for (ll i = a; i < n; i++)
#define ios ... | [["+", 8, 9, 0, 57, 64, 1, 0, 34, 0, 21], ["+", 0, 57, 64, 1, 0, 34, 12, 27, 28, 22], ["+", 0, 57, 64, 1, 0, 34, 12, 27, 17, 68]] | 1 | 219 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
string ans = "";
while (n > 0) {
ans += 'a' + n % 26 - 1;
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
string ans = "";
while (n > 0) {
--n;
ans += 'a' + n % 26;
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << endl;
} | [["+", 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, 1, 0, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 71 |
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
s -= 26 ** i
if s <= 0:
break
else:
count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
number = min(26, n // 26 ** (i-1))
n -= number * 26 **... | import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
s -= 26 ** i
if s <= 0:
break
else:
count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
number = min(26, n // 26 ** (i-1))
n -= number * 26 **... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25]] | 5 | 181 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < int(N); ++i)
#define rep1(i, N) for (int i = 1; i < int(N); ++i)
#define all(a) (a).begin(), (a).end()
#define print(v) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < int(N); ++i)
#define rep1(i, N) for (int i = 1; i < int(N); ++i)
#define all(a) (a).begin(), (a).end()
#define print(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], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 3, 4, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 354 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 22]] | 1 | 253 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string name = "";
cin >> N;
while (N > 0) {
name.push_back('a' + (N - 1) % 26);
N = N / 26;
}
reverse(name.begin(), name.end());
cout << name << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
string name = "";
cin >> N;
while (N > 0) {
name.push_back('a' + (N - 1) % 26);
N = (N - 1) / 26;
}
reverse(name.begin(), name.end());
cout << name << endl;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 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 | 77 |
#!/usr/bin/env pypy
import sys
import string
def get_int(): return int(sys.stdin.readline().strip())
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_list(): return list(map(int, sys.stdin.readline().strip().split()))
def get_string(): return sys.stdin.readline().strip()
def out(data): ... | #!/usr/bin/env pypy
import sys
import string
def get_int(): return int(sys.stdin.readline().strip())
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_list(): return list(map(int, sys.stdin.readline().strip().split()))
def get_string(): return sys.stdin.readline().strip()
def out(data): ... | [["-", 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 | 204 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define rep0(i, n) for (ll i = 0; i <= (... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep1(i, n) for (ll i = 1; i <= (ll)(n); i++)
#define rep0(i, n) for (ll i = 0; i <= (... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 11, 12, 2... | 1 | 306 |
#include <stack>
#include <stdio.h>
typedef long long ll;
int main(void) {
ll n;
std::stack<char> s;
scanf("%lld", &n);
while (n)
s.push(n % 26 + 'a' - 1), n /= 26;
while (s.size())
printf("%c", s.top()), s.pop();
return 0;
} | #include <stack>
#include <stdio.h>
typedef long long ll;
int main(void) {
ll n;
std::stack<char> s;
scanf("%lld", &n);
while (n)
s.push(--n % 26 + 'a'), n /= 26;
while (s.size())
printf("%c", s.top()), s.pop();
return 0;
} | [["+", 3, 4, 0, 16, 31, 16, 31, 27, 17, 68], ["-", 0, 34, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 34, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 90 |
n = int(input())
alp = 'abcdefghijklmnopqrstuvwxvz'
bef = [0 for _ in range(11)]
ans = ''
check = 2
count = 2
while count < 14 :
s = (pow(26, count) - 1) // 25
if n < s :
check -= 1
n -= (pow(26, check) - 1) // 25
while n > 0 :
if n >= pow(26, check - 1) :
n ... | n = int(input())
alp = 'abcdefghijklmnopqrstuvwxyz'
bef = [0 for _ in range(11)]
ans = ''
check = 2
count = 2
while count < 14 :
s = (pow(26, count) - 1) // 25
if n < s :
check -= 1
n -= (pow(26, check) - 1) // 25
while n > 0 :
if n >= pow(26, check - 1) :
n ... | [["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6]] | 5 | 150 |
n = gets.to_i - 1
answer = ''
chars = ('a'..'z').to_a
loop do
mod = n % chars.size
answer << chars[mod]
n /= chars.size
break if n <= 0
end
puts answer.reverse
| n = gets.to_i
answer = ''
chars = ('a'..'z').to_a
loop do
n -= 1
mod = n % chars.size
answer << chars[mod]
n /= chars.size
break if n <= 0
end
puts answer.reverse
| [["-", 36, 36, 0, 493, 0, 662, 12, 738, 17, 33], ["-", 36, 36, 0, 493, 0, 662, 12, 738, 12, 612], ["+", 0, 652, 196, 737, 8, 736, 0, 755, 31, 22], ["+", 0, 652, 196, 737, 8, 736, 0, 755, 17, 110], ["+", 0, 652, 196, 737, 8, 736, 0, 755, 12, 612]] | 4 | 54 |
n=int(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
ans=[]
while n>0:
ans.append(alphabet[n%26-1])
n=n//26
ans.reverse()
print("".join(ans))
| n=int(input())
alphabet="abcdefghijklmnopqrstuvwxyz"
ans=[]
while n>0:
n-=1
ans.append(alphabet[n%26])
n=n//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 | 55 |
def resolve():
lower = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
ans = ""
while N > 26:
idx = N % 26
ans += lower[idx-1]
N = N//26
idx = N % 26
ans += lower[idx - 1]
print(ans[::-1])
if __name__ == "__main__":
resolve() |
def resolve():
lower = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
ans = ""
while N > 26:
idx = N % 26
ans += lower[idx-1]
N = -(-N//26)-1
idx = N % 26
ans += lower[idx - 1]
print(ans[::-1])
if __name__ == "__main__":
resolve()
| [["+", 0, 1, 0, 662, 12, 657, 31, 664, 17, 33], ["+", 0, 662, 12, 657, 31, 664, 28, 23, 0, 24], ["+", 31, 664, 28, 23, 0, 657, 31, 664, 17, 33], ["+", 0, 662, 12, 657, 31, 664, 28, 23, 0, 25], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 78 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
const int mod = 1E9 + 7;
const int inf = 1 << 29;
char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
int base = 26;
int main() {
ll n;
cin >> n;
string name = "";
while (n >= base) {
name ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
const int mod = 1E9 + 7;
const int inf = 1 << 29;
char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
int base = 26;
int main() {
ll n;
cin >> n;
string name = "";
n -= 1;
while (n >= base) {... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 124 |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
typedef pair<ll, ll> PLL;
typedef vector<int> VI;
typedef vector<char> VC;
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<ll> VLL;
typedef vector<PLL> VP;
const static int INF = 1000000000;
const stat... | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
typedef pair<ll, ll> PLL;
typedef vector<int> VI;
typedef vector<char> VC;
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<ll> VLL;
typedef vector<PLL> VP;
const static int INF = 1000000000;
const stat... | [["-", 0, 14, 8, 9, 0, 52, 15, 339, 51, 13], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 22]] | 1 | 578 |
import string
N = int(input())
S = string.ascii_lowercase
ans = ''
if N <= 26:
ans = S[N - 1]
while True:
N, b = divmod(N, 26)
ans = S[b - 1] + ans
if b == 0:
N -= 1
if N <= 26:
ans = S[N - 1] + ans
break
print(ans) | import string
N = int(input())
S = string.ascii_lowercase
ans = ''
if N <= 26:
ans = S[N - 1]
else:
while True:
N, b = divmod(N, 26)
ans = S[b - 1] + ans
if b == 0:
N -= 1
if N <= 26:
ans = S[N - 1] + ans
break
print(ans) | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]] | 5 | 83 |
import sys
from string import ascii_lowercase
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N = int(readline())
ans = []
while N:
N, r = divmod(N, 26)
ans.append(ascii_lowe... | import sys
from string import ascii_lowercase
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N = int(readline())
ans = []
while N:
N, r = divmod(N - 1, 26)
ans.append(ascii_lowe... | [["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 17, 33], ["-", 0, 652, 3, 4, 0, 206, 206, 657, 12, 612]] | 5 | 108 |
import sys
import itertools
# import numpy as np
import time
import math
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# map(int, input().split())
# list(map(int, input().split()))
N = i... | import sys
import itertools
# import numpy as np
import time
import math
sys.setrecursionlimit(10 ** 7)
from collections import defaultdict
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# map(int, input().split())
# list(map(int, input().split()))
N = i... | [["-", 0, 52, 8, 196, 0, 1, 0, 677, 17, 691], ["+", 0, 52, 8, 196, 0, 1, 0, 677, 17, 110]] | 5 | 121 |
import string
# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase
x = N - 1
ans = []
# while True:
# x -= 1
# mod = x % 26
# ans = [ mod ] + ans
# x = x // 26
# if x <= 0:
# break
# print(ans)
# print("".join([ letters[v] for v in ans ]))
whi... | import string
# 1千兆 + 1
N = int(input())
n_digits = len(str(1000000000000001))
letters = string.ascii_lowercase
# x = N - 1
x = N
ans = []
# while True:
# x -= 1
# mod = x % 26
# ans = [ mod ] + ans
# x = x // 26
# if x <= 0:
# break
# print(ans)
# print("".join([ letters[v] for v in ans ... | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 0, 52, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 0, 22]] | 5 | 100 |
/// 2:30 PM 21/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)
#include <bits/stdc++.h>
using namespace std;
#define pll pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define VARIABLE_ERROR(x) cout << #x << " = " << x <<... | /// 2:30 PM 21/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)
#include <bits/stdc++.h>
using namespace std;
#define pll pair<ll, ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define VARIABLE_ERROR(x) cout << #x << " = " << 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, 1, 0, 11, 12, 23, 0, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13]] | 1 | 143 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def input():
return sys.stdin.readline()
def Base_10_to_n(i10, n, ans_list:list):
# 各桁を0-indexにするために1減らす
i10 -= 1
if(int(i10/n)):
ans_list.append(Base_10_to_n(int(i10/n), n, ans_list))
return str(i10%n)
return str(i10%n)
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
def input():
return sys.stdin.readline()
def Base_10_to_n(i10, n, ans_list:list):
# 各桁を0-indexにするために1減らす
i10 -= 1
if(int(i10/n)):
ans_list.append(Base_10_to_n(int(i10/n), n, ans_list))
return str(i10%n)
return str(i10%n)
... | [["+", 0, 1, 0, 662, 12, 657, 12, 652, 63, 22], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 657, 12, 652, 3, 4, 0, 25]] | 5 | 167 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
#define print(x) cout << (x) << endl
#define prints(x, y) cout << (x) << " " << (y) << endl
#define rep(i, ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <stdio.h>
#include <string>
#include <vector>
//#include <bits/stdc++.h>
using namespace std;
#define print(x) cout << (x) << endl
#define prints(x, y) cout << (x) << " " << (y) << endl
#define rep(i, ... | [["+", 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 | 166 |
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
uint64_t a;
scanf("%" SCNu64 "", &a);
char s[12] = "";
int i;
for (i = 0; a; i++) {
s[i] = 'a' - 1 + a % 26;
a /= 26;
}
for (i--; i >= 0; i--)
printf("%c", s[i]);
} | #include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
uint64_t a;
scanf("%" SCNu64, &a);
char s[12] = "";
int i;
for (i = 0; a; i++) {
s[i] = 'a' + --a % 26;
a /= 26;
}
for (i--; i >= 0; i--)
printf("%c", s[i]);
} | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 0, 2, 3, 4, 0, 61, 0, 5, 0, 62], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 11, 12, 16, 12, 16, 31, 27, 17, 68]] | 0 | 99 |
n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
answer = ""
while n > 0:
n -= 1
answer += alpha[n%26]
n//=26
print(answer) | n = int(input())
alpha = "abcdefghijklmnopqrstuvwxyz"
answer = ""
while n > 0:
n -= 1
answer += alpha[n%26]
n//=26
print(answer[::-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 | 40 |
#include <iostream>
#define int long long
using namespace std;
int a[12];
int sum = 1;
int llPow(int a, int b) {
int ans = 1;
for (int i = 0; i < b; i++) {
ans *= a;
}
return ans;
}
int bk(int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
ans += llPow(26, i + 1);
}
return ans;
}
int setIni... | #include <iostream>
#define int long long
using namespace std;
int a[12];
int sum = 1;
int llPow(int a, int b) {
int ans = 1;
for (int i = 0; i < b; i++) {
ans *= a;
}
return ans;
}
int bk(int n) {
int ans = 0;
for (int i = 0; i < n; i++) {
ans += llPow(26, i + 1);
}
return ans;
}
int setIni... | [["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 629 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int a;
cin >> a;
int x = 26;
string s;
int count = 0;
int i = 0;
while (a > 0) {
s[i] = (a - 1) % x;
// cout<<a%x<<endl;
a = (a - 1) / x;
i++;
}
for (int j = i; j >= 0; j--) {
cout << s[j];
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long int a;
cin >> a;
int x = 26;
string s;
int count = 0;
int i = 0;
while (a > 0) {
s[i] = 'a' + (a - 1) % x;
// cout<<a%x<<endl;
a = (a - 1) / x;
i++;
}
for (int j = i - 1; j >= 0; j--) {
cout << s[j];
}
}
| [["+", 0, 1, 0, 11, 12, 16, 31, 103, 0, 104], ["+", 0, 1, 0, 11, 12, 16, 31, 103, 0, 125], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13]] | 1 | 97 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
long long n;
cin >> n;
string ans("");
while (n > 0) {
ans += char('a' + (n % 26) - 1);
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
// Your code here!
long long n;
cin >> n;
string ans("");
while (n > 0) {
n--;
ans += char('a' + (n % 26));
n /= 26;
}
reverse(ans.begin(), ans.end());
cout << ans << endl;
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], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 82 |
n=gets.to_i
alp=[*"a".."z"]
res=[]
mod=26
while n>0
n -= 1
res << alp[n%mod]
n /= mod
end
puts res.join | n=gets.to_i
alp=[*"a".."z"]
res=[]
mod=26
while n>0
n -= 1
res << alp[n%mod]
n /= mod
end
puts res.reverse.join | [["+", 0, 652, 3, 4, 0, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 652, 3, 4, 0, 652, 17, 131]] | 4 | 47 |
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll N;
char name[20];
cin >> N;
int i = 0;
while (N > 0) {
if (N % 26 == 0) {
name[i] = 26 + 96;
N /= 26;
i++;
} else ... | #include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
ll N;
char name[20];
cin >> N;
int i = 0;
while (N > 0) {
if (N % 26 == 0) {
name[i] = 26 + 96;
N /= 26;
N--;
i++;
... | [["+", 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 | 139 |
n = int(input())-1
result = ""
if n!=0:
while(1):
tmp = n % 26
result += chr(tmp+97)
n = n // 26
if n==0: break
n -= 1
print(result[::-1]) | n = int(input())-1
result = ""
while(1):
tmp = n % 26
result += chr(tmp+97)
n = n // 26
if n==0: break
n -= 1
print(result[::-1]) | [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 79], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 102]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
string convertToTitle(LL n) {
string ans = "";
while (n) {
n -= 1;
ans += 'A' + n % 26;
n /= 26;
}
reverse(ans.begin(), ans.end());
return ans;
}
int main() {
LL n;
cin >> n;
cout << convertToTitle(n);
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
string convertToTitle(LL n) {
string ans = "";
while (n) {
n -= 1;
ans += 'a' + n % 26;
n /= 26;
}
reverse(ans.begin(), ans.end());
return ans;
}
int main() {
LL n;
cin >> n;
cout << convertToTitle(n);
}
| [["-", 0, 1, 0, 11, 12, 16, 31, 103, 0, 125], ["+", 0, 1, 0, 11, 12, 16, 31, 103, 0, 125]] | 1 | 88 |
n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'
keta = 1
while n > 26**keta:
n -= 26**keta
keta += 1
ans =''
for i in range(keta):
a =n // 26**(keta-1-i)
ans += eigo[a]
n = n % (26**(keta-1-i))
print(ans) | n = int(input())
eigo = 'abcdefghijklmnopqrstuvwxyz'
keta = 1
while n > 26**keta:
n -= 26**keta
keta += 1
ans =''
n = n-1
for i in range(keta):
a =n // 26**(keta-1-i)
ans += eigo[a]
n = n % (26**(keta-1-i))
print(ans)
| [["+", 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, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 33], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
string s = "", k = "abcdefghijklmnopqrstuvwxyz";
while (n) {
int pos = n % 26;
n /= 26;
s += k[pos - 1];
}
reverse(s.begin(), s.end());
cout << s;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
string s = "", k = "abcdefghijklmnopqrstuvwxyz";
while (n) {
n--;
int pos = n % 26;
n /= 26;
s += k[pos];
}
reverse(s.begin(), s.end());
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, 11, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 12, 69, 341, 342, 0, 16, 12, 13]] | 1 | 81 |
n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
t = 0
res = ""
while n > 26:
res += s[n % 26 - 1]
n //= 26
res += s[n - 1]
print(res[::-1]) | n = int(input())
s = 'abcdefghijklmnopqrstuvwxyz'
t = 0
res = ""
while n > 26:
n -= 1
res += s[n % 26]
n //= 26
res += s[n - 1]
print(res[::-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], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 17, 33], ["-", 0, 1, 0, 677, 12, 206, 206, 657, 12, 612]] | 5 | 56 |
no = "abcdefghijklmnopqrstuvwxyz"
def main():
N = int(input())
ans = ""
while N > 0:
N -= 1
ans += no[N % 26]
N //= 26
return ans
if __name__ == '__main__':
print(main()) | no = "abcdefghijklmnopqrstuvwxyz"
def main():
N = int(input())
ans = ""
while N > 0:
N -= 1
ans += no[N % 26]
N //= 26
return ans[::-1]
if __name__ == '__main__':
print(main()) | [["+", 0, 14, 8, 196, 0, 37, 0, 206, 0, 70], ["+", 8, 196, 0, 37, 0, 206, 206, 663, 0, 102], ["+", 0, 37, 0, 206, 206, 663, 0, 664, 17, 33], ["+", 0, 37, 0, 206, 206, 663, 0, 664, 28, 612], ["+", 0, 14, 8, 196, 0, 37, 0, 206, 0, 73]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N;
cin >> N;
N = N - 1;
bool finish = true;
int i = 0;
vector<char> vec(30);
while (finish) {
int moji = N % 26;
vec.at(i) = char(moji + 97);
N = N / 26 - 1;
i++;
if (N == -1)
finish = false;
}
for (int j = 1... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t N;
cin >> N;
N = N - 1;
bool finish = true;
int i = 0;
vector<char> vec(30);
while (finish) {
int moji = N % 26;
vec.at(i) = char(moji + 97);
N = N / 26 - 1;
i++;
if (N == -1)
finish = false;
}
for (int j = 1... | [["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 123 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#incl... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#incl... | [["-", 0, 52, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 435 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long b = 0;
List<Character> list = new ArrayList<>();
while (n > 0) {... | import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long b = 0;
List<Character> list = new ArrayList<>();
while (n > 0) {... | [["+", 0, 52, 8, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 27, 0, 68], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["-", 3, 4, 0, 74, 51, 23, 0, 16, 17, 33], ["-", 3, 4, 0, 74, 51, 23, 0, 16, 12, 499]] | 3 | 143 |
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()
def resolve():
n=int(input())
while n>0:
n-=1
a,b=divmod(n,26)
n//=26
ans+=chr(ord('a')+b)
for i in ans[::-1]:
print(i,end='')
print()
resolve... | import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()
def resolve():
n=int(input())
ans=''
while n>0:
n-=1
a,b=divmod(n,26)
n//=26
ans+=chr(ord('a')+b)
for i in ans[::-1]:
print(i,end='')
print()
... | [["+", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 557, 0, 654], ["+", 8, 196, 0, 1, 0, 662, 12, 557, 0, 655]] | 5 | 102 |
N = int(input())
i = 0
list26 = []
while (N > 0):
list26.append(N%26)
N = int(N/26)
print(list26)
for i in range(len(list26)):
if(i != len(list26)-1):
if(list26[i] <= 0):
list26[i] = list26[i] + 26
list26[i+1] = list26[i+1] - 1
else:
if(list26[i]==0):
... | N = int(input())
i = 0
list26 = []
while (N > 0):
list26.append(N%26)
N = int(N/26)
for i in range(len(list26)):
if(i != len(list26)-1):
if(list26[i] <= 0):
list26[i] = list26[i] + 26
list26[i+1] = list26[i+1] - 1
else:
if(list26[i]==0):
list26.pop(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 | 155 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long d_count = 0;
// string s = "abcdefghijklmnopqrstuvwxyz";
string ans_rev;
string ans;
while (N > 0) {
d_count++;
long long j = N % 26;
ans_rev += ((char)'a' + (j - 1));
N = N / 26;
}
for (lon... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
long long d_count = 0;
// string s = "abcdefghijklmnopqrstuvwxyz";
string ans_rev;
string ans;
while (N > 0) {
d_count++;
N--;
long long j = N % 26;
ans_rev += ((char)'a' + (j));
N = N / 26;
}
for... | [["+", 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, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["-", 12, 23, 0, 16, 12, 23, 0, 16, 12, 13]] | 1 | 105 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int n;
cin >> n;
string ans = "";
while (n > 0) {
ans = (char)((n % 26) - 1 + 'a') + ans;
n /= 26;
}
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
long long int n;
cin >> n;
string ans = "";
while (n > 0) {
n--;
ans = (char)((n % 26) + 'a') + ans;
n /= 26;
}
cout << ans << endl;
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], ["-", 31, 74, 51, 23, 0, 16, 31, 16, 17, 33], ["-", 31, 74, 51, 23, 0, 16, 31, 16, 12, 13]] | 1 | 75 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FAST() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define FAST() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85]] | 1 | 118 |
n=int(input())
d='abcdefghijklmnopqrstuvwxyz'
x=n
s=''
n-=1
while(n>0):
s+=d[n%26]
n=n//26
n-=1
print(s[::-1])
| n=int(input())
d='abcdefghijklmnopqrstuvwxyz'
x=n
s=''
n-=1
while(n>=0):
s+=d[n%26]
n=n//26
n-=1
print(s[::-1])
| [["-", 0, 656, 0, 52, 15, 23, 0, 666, 667, 47], ["+", 0, 656, 0, 52, 15, 23, 0, 666, 667, 20]] | 5 | 56 |
N = int(input())
ans = ''
while N >0:
N -= 1
ans += chr(97 + N%26)
N //= 26
print(ans) | N = int(input())
ans = ''
while N >0:
N -= 1
ans += chr(97 + N%26)
N //= 26
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 | 37 |
def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def solve(n):
#n = readInt()
i = 1
maxk = 26
while 1:
if n<=maxk:
ke = i
break
else:
i+=1
maxk =maxk + 26**i
#print(ke)
#ke 桁数
tar... | def readInt():
return int(input())
def readInts():
return list(map(int, input().split()))
def readChar():
return input()
def readChars():
return input().split()
def solve(n):
#n = readInt()
i = 1
maxk = 26
while 1:
if n<=maxk:
ke = i
break
else:
i+=1
maxk =maxk + 26**i
#print(ke)
#ke 桁数
tar... | [["+", 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 | 174 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Vi = vector<int>;
int main() {
long long n;
cin >> n;
vector<long long> r;
while (n > 0) {
r.push_back(n ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Vi = vector<int>;
int main() {
long long n;
cin >> n;
vector<long long> r;
while (n > 0) {
n -= 1;
r.... | [["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 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]] | 1 | 136 |
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(64+num)
elif num%26==0:
return num2alpha(num//26-1)+chr(90)
else:
return num2alpha(num//26)+chr(64+num%26)
n=int(input())
print(num2alpha(n).lower()) | [["-", 0, 37, 0, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 37, 0, 652, 3, 4, 0, 657, 31, 612], ["-", 0, 657, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 657, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, ... | 5 | 72 |
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
long N = input.nextLong();
String ans = "";
Stack<Character> seq = new Stack<Character>();
while (N > 0) {
char cur = (char)(N % 26 ... | import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
long N = input.nextLong();
String ans = "";
Stack<Character> seq = new Stack<Character>();
while (N > 0) {
N--;
char cur = (ch... | [["+", 0, 52, 8, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 52, 8, 196, 0, 1, 0, 27, 0, 68], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35], ["-", 49, 200, 51, 74, 51, 23, 0, 16, 12, 499], ["+", 49, 200, 51, 74, 51, 23, 0, 16, 12, 499]] | 3 | 140 |
N = int(input())
amalist = []
while True:
num = N % 26
amalist.append(num)
N = N // 26
if N == 0:
break
amalist.reverse()
alphalist = [chr(i) for i in range(97,97+26)]
result = []
for i in amalist:
result.append(alphalist[i-1])
print(''.join(result))
| N = int(input())
amalist = []
while True:
N -= 1
num = N % 26
amalist.append(num)
N = N // 26
if N == 0:
break
amalist.reverse()
alphalist = [chr(i) for i in range(97,97+26)]
result = []
for i in amalist:
result.append(alphalist[i])
print(''.join(result)) | [["+", 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 | 91 |
N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'
queue = []
while N > 0:
queue.insert(0, alphabets[N % 26])
N //= 26
print(''.join(queue)) | N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'
queue = []
while N > 0:
queue.insert(0, alphabets[N % 26])
N -= 1
N //= 26
print(''.join(queue)) | [["+", 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 | 72 |
N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'
queue = []
if N <= 26:
print(alphabets[N])
else:
while N > 0:
print(N)
queue.insert(0, alphabets[N % 26])
N -= 1
N //= 26
print(''.join(queue)) | N = int(input())
alphabets = {i: chr(i + 96) for i in range(1, 26)}
alphabets[0] = 'z'
queue = []
if N <= 26:
print(alphabets[N])
else:
while N > 0:
queue.insert(0, alphabets[N % 26])
N -= 1
N //= 26
print(''.join(queue)) | [["-", 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, 25]] | 5 | 93 |
#include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout << setprecision(9) << fixed;
int n;
cin >> n;
string s;
while (n > 0) {
int t1 = n % 26;
char c = 'a' + t1;
if (t1 == 0) {
s += 'z';
n -=... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout << setprecision(9) << fixed;
int n;
cin >> n;
string s;
while (n > 0) {
int t1 = n % 26;
char c = 'a' + t1 - 1;
if (t1 == 0) {
s += 'z';
... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 123 |
// 6/14 リアルタイム参加
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
char alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q'... | // 6/14 リアルタイム参加
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
char alphabet[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q'... | [["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]] | 1 | 265 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define mp make_pair
#define RFOR(i, a, n) for (int i = n; i > a; i--)
#define pii pair<long long int, long long int>
#define ub upper_bound
#define lb lower_bound
#define MOD 1000000007
typedef long long... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define mp make_pair
#define RFOR(i, a, n) for (int i = n; i > a; i--)
#define pii pair<long long int, long long int>
#define ub upper_bound
#define lb lower_bound
#define MOD 1000000007
typedef long long... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 263 |
i = int(input())
nexti = 0
nextii = 0
ans = str()
nextans = str()
while i == 0:
nexti = i // 26
mod = i % 26
if mod == 0:
nextans = "z" + ans
nextii = nexti-1
nexti = nextii
elif mod == 1:
nextans = "a" + ans
elif mod == 2:
nextans = "b" + ans
elif mod == 3:
nextans = "c" + ans
e... | i = int(input())
nexti = 0
nextii = 0
ans = str()
nextans = str()
while i > 0:
nexti = i // 26
mod = i % 26
if mod == 0:
nextans = "z" + ans
nextii = nexti-1
nexti = nextii
elif mod == 1:
nextans = "a" + ans
elif mod == 2:
nextans = "b" + ans
elif mod == 3:
nextans = "c" + ans
el... | [["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 52, 15, 666, 667, 47], ["-", 36, 36, 0, 656, 0, 52, 75, 76, 0, 95], ["-", 36, 36, 0, 656, 0, 52, 75, 76, 0, 102]] | 5 | 371 |
N = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while N > 0:
ans = abc[(N%26)-1] + ans
N //= 26
print(ans) | N = int(input())
abc = 'abcdefghijklmnopqrstuvwxyz'
ans = ''
while N > 0:
N -= 1
ans = abc[(N%26)] + ans
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], ["-", 0, 662, 12, 657, 31, 206, 206, 657, 17, 33], ["-", 0, 662, 12, 657, 31, 206, 206, 657, 12, 612]] | 5 | 43 |
def resolve():
N = int(input())
base = 26
char_a = 96
s = ''
while N > 0:
s = chr(char_a + N % base) + s
N = N//base
print(s)
resolve() | def resolve():
N = int(input())
base = 26
char_a = 97
s = ''
while N > 0:
N -= 1
s = chr(char_a + N%base) + s
N = N//base
print(s)
resolve() | [["-", 0, 14, 8, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 14, 8, 196, 0, 1, 0, 662, 12, 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]] | 5 | 52 |
num=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)
ans=num2alpha(num)
print(ans) | num=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)
ans=num2alpha(num).lower()
print(ans) | [["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]] | 5 | 75 |
N = int(input())
ans = ""
b = []
c = 0
while N > 0:
b.append((N-1)%26)
N = int((N-1)/26)
c = c + 1
for i in range(c):
ans = ans + chr(b[i]+97)
print(ans)
| N = int(input())
ans = ""
b = []
c = 0
while N > 0:
b.append((N-1)%26)
N = int((N-1)/26)
c = c + 1
for i in range(c):
ans = chr(b[i]+97) + ans
print(ans)
| [["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 78 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.