Submission #14611823


Source Code Expand

Copy
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
            ∧_∧
      ∧_∧  (´<_` )  Welcome to My Coding Space!
     ( ´_ゝ`) /  ⌒i     @hamayanhamayan0
    /   \     | |
    /   / ̄ ̄ ̄ ̄/  |
  __(__ニつ/     _/ .| .|____
     \/____/ (u ⊃
---------------------------------------------------------------------------------------------------*/














ll N;
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> N;

	string ans = "";
	while (0 < N) {
		N--;
		int m = N % 26;
		ans = char('a' + m) + ans;
		N /= 26;
	}
	cout << ans << endl;
}





Submission Info

Submission Time
Task C - One Quadrillion and One Dalmatians
User hamayanhamayan
Language C++ (GCC 9.2.1)
Score 300
Code Size 1563 Byte
Status AC
Exec Time 6 ms
Memory 3596 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 29
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, test1.txt, test10.txt, test11.txt, test12.txt, test13.txt, test14.txt, test15.txt, test16.txt, test17.txt, test18.txt, test19.txt, test2.txt, test20.txt, test21.txt, test22.txt, test23.txt, test24.txt, test25.txt, test26.txt, test3.txt, test4.txt, test5.txt, test6.txt, test7.txt, test8.txt, test9.txt
Case Name Status Exec Time Memory
sample1.txt AC 6 ms 3568 KB
sample2.txt AC 3 ms 3508 KB
sample3.txt AC 2 ms 3596 KB
test1.txt AC 3 ms 3460 KB
test10.txt AC 3 ms 3596 KB
test11.txt AC 3 ms 3584 KB
test12.txt AC 2 ms 3492 KB
test13.txt AC 3 ms 3512 KB
test14.txt AC 2 ms 3564 KB
test15.txt AC 3 ms 3496 KB
test16.txt AC 2 ms 3564 KB
test17.txt AC 3 ms 3532 KB
test18.txt AC 1 ms 3572 KB
test19.txt AC 2 ms 3568 KB
test2.txt AC 3 ms 3580 KB
test20.txt AC 2 ms 3568 KB
test21.txt AC 2 ms 3572 KB
test22.txt AC 2 ms 3500 KB
test23.txt AC 2 ms 3456 KB
test24.txt AC 2 ms 3520 KB
test25.txt AC 2 ms 3548 KB
test26.txt AC 2 ms 3456 KB
test3.txt AC 2 ms 3564 KB
test4.txt AC 2 ms 3560 KB
test5.txt AC 2 ms 3536 KB
test6.txt AC 2 ms 3496 KB
test7.txt AC 2 ms 3500 KB
test8.txt AC 2 ms 3552 KB
test9.txt AC 2 ms 3552 KB