結果
問題 | No.327 アルファベット列 |
ユーザー |
|
提出日時 | 2016-06-28 20:15:58 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 463 ms |
コンパイル使用メモリ | 59,608 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 22:39:48 |
合計ジャッジ時間 | 1,854 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <iostream>#include <vector>using namespace std;//first one :A-Z:0-25//the other :A-Z:1-26int main(){long int n;int m;bool flag = true;string ans = "";vector<int> q;cin >> n;n=n+1;do{m=(n-1)%26;n=(n-1)/26;ans = char('A'+m)+ans;}while(n!=0);cout << ans << endl;}