結果

問題 No.327 アルファベット列
ユーザー Naco
提出日時 2019-10-20 19:26:10
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 1,559 ms
コンパイル使用メモリ 166,736 KB
実行使用メモリ 18,764 KB
最終ジャッジ日時 2024-07-02 17:30:27
合計ジャッジ時間 7,658 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 WA * 38 OLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    long long N;
    cin >> N;
    string s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    if(N<26){
        cout << s[N] << endl;
    }else{
        string ans="";
        int c=(N-26)/26;
        int d=c/26;
        int e=c%26;
        for(int i=0;i<=d;i++){
            ans+=s[e];
        }
        int f=(N-26)%26;
        ans+=s[f];
        cout << ans << endl;
    }
}
0