結果
問題 | No.327 アルファベット列 |
ユーザー |
![]() |
提出日時 | 2020-10-16 00:28:05 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 1,938 ms |
コンパイル使用メモリ | 195,992 KB |
最終ジャッジ日時 | 2025-01-15 07:44:14 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)#define ALL(v) v.begin(),v.end()typedef long long ll;#include <bits/stdc++.h>using namespace std;int main(){ll n;cin>>n;vector<char> A;ll p=26;A.push_back(char(n%26+'A'));n-=p;while(n>=0){A.push_back(char((n/p)%26+'A'));p*=26;n-=p;}reverse(ALL(A));rep(i,A.size()) cout<<A[i];cout<<endl;return 0;}