結果

問題 No.327 アルファベット列
ユーザー treeonetreeone
提出日時 2015-12-28 22:40:04
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 716 bytes
コンパイル時間 1,104 ms
コンパイル使用メモリ 72,832 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 08:00:07
合計ジャッジ時間 1,977 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef vector<lint> vli;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	lint n;
	cin>>n;
	string ans;
	for(lint i=10;i>0;i--){
		if(n/(int)pow(26,i)){
			ans+='A'+n/pow(26,i)-1;
			n%=(lint)pow(26,i);
		}
	}
	ans+='A'+n;
	o(ans);
}
0