結果

問題 No.327 アルファベット列
ユーザー zaichu
提出日時 2015-12-30 19:11:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 1,701 ms
コンパイル使用メモリ 158,932 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-06 22:35:51
合計ジャッジ時間 2,683 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
	long long n;
	cin >> n;
	string str = "";
	while(n >= 26){
		int mod = n % 26;
		str += char('A' + mod);
		n = (n - 26) / 26;
	}
	str += char('A' + n);
	reverse(str.begin(),str.end());
	cout << str << endl;
	return 0;
}
0