結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-19 00:13:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 362 bytes |
| コンパイル時間 | 1,233 ms |
| コンパイル使用メモリ | 164,148 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 17:08:11 |
| 合計ジャッジ時間 | 2,952 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 50 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
long long N,t,cnt=1;
stack<char> st;
cin >> N;
t=1;N++;
while(N-t*26>0) t*=26,N-=t,cnt++;
N--;
while(cnt>0){
st.push('A'+(N%26));
N/=26;cnt--;
cout << N << endl;
}
while(!st.empty()) cout << st.top(),st.pop();
cout << endl;
return 0;
}