結果

問題 No.327 アルファベット列
ユーザー oxyshower
提出日時 2020-01-09 17:58:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 4,561 ms
コンパイル使用メモリ 166,544 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-23 03:59:58
合計ジャッジ時間 2,989 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 24 WA * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif
#define int long long

signed main(){

  int n; cin >> n;
  n++;

  string ans;
  while(n > 0){
    ans += (char)('A' + (n-1) % 26);
    n /= 26;
  }
  reverse(ans.begin(),ans.end());
  cout << ans << endl;

  return 0;
}
0