結果

問題 No.327 アルファベット列
ユーザー 👑 CleyL
提出日時 2019-06-21 15:44:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 853 ms
コンパイル使用メモリ 58,332 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 11:01:09
合計ジャッジ時間 2,499 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main(){
    long long n;cin>>n;
    if(n==0){
      cout << "A" << endl;
      return 0;
    }
    string s;
    while(n != 0){
        s.push_back('A'+n%26);
        n/=26;
    }
    reverse(s.begin(),s.end());
    if(s.size()!=1)s[0]--;
    cout << s << endl;
}
0