結果

問題 No.327 アルファベット列
ユーザー ldsyb
提出日時 2016-03-05 20:55:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 518 ms
コンパイル使用メモリ 56,380 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-24 14:28:44
合計ジャッジ時間 1,762 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other WA * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
   long long n;
   string s = "";
   cin >> n;
   if(n == 0){
      cout << 'A' << endl;
      return 0;
   }
   while(n != 0){
      n--;
      s += char('A' + n % 26);
      n /= 26;
   }
   for(int i = s.size() - 1;i != -1;i--) cout << s[i];
   cout << endl;
}
0