結果

問題 No.327 アルファベット列
コンテスト
ユーザー vjudge1
提出日時 2026-01-14 16:45:33
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,917 ms
コンパイル使用メモリ 213,948 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-14 16:45:37
合計ジャッジ時間 3,304 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other WA * 50
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
using namespace std;
long long n;
int main(){
    cin >> n;
    long long s = 0;
    while(n > 0){
    	s *= 10;
    	s += n % 26;
    	n /= 26;
	}
	string c = "";
    while(s >= 26){
    	int t = s % 26;
    	char e = t + 65;
    	c += e;
    	s /= 26;
	}
	char e = s + 65;
	c += e;
	for(int i = c.size() - 1;i >= 0;i--){
		cout << c[i]; 
	}
	return 0;
}
0