結果

問題 No.327 アルファベット列
コンテスト
ユーザー FF256grhy
提出日時 2015-12-25 05:32:06
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 296 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 184 ms
コンパイル使用メモリ 40,512 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-23 09:39:46
合計ジャッジ時間 1,440 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

long long int n;
int ans[9];

int main(void) {
	scanf("%lld", &n);
	int c = 0;
	long long int d = 1;
	while(0 <= n) {
		ans[c] = (n / d) % 26; c++;
		d *= 26;
		n -= d;
	}
	c--;
	int i;
	for(i = c; 0 <= i; i--) {
		printf("%c", 'A' + ans[i]);
	}
	printf("\n");
	
	return 0;
}
0