結果
問題 | No.327 アルファベット列 |
ユーザー |
![]() |
提出日時 | 2018-03-13 05:16:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 2,094 ms |
コンパイル使用メモリ | 158,044 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 08:23:40 |
合計ジャッジ時間 | 3,709 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main() {ll n;cin >> n;int s[15];int k = 0;while (n>=pow(26,k+1)) {n -= pow(26, ++k);}int i = 0;while(i<=k) {s[i++] = n % 26;n /= 26;}for (i--;i >= 0;i--) {char c = 'A' + s[i];cout << c;}cout << endl;return 0;}