結果
| 問題 |
No.327 アルファベット列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-29 11:06:54 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 389 bytes |
| コンパイル時間 | 475 ms |
| コンパイル使用メモリ | 29,568 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 08:10:39 |
| 合計ジャッジ時間 | 1,662 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 WA * 21 |
ソースコード
#include <stdio.h>
#include <string.h>
int main(void)
{
char ans[10];
long N, length, i = 0;
scanf("%ld", &N);
do {
if (i == 0) ans[i] = N % 26 + 'A';
else ans[i] = N % 26 - 1 + 'A';
++i;
} while (N /= 26);
ans[i] = '\0';
length = strlen(ans);
for (i = length - 1; i >= 0; --i) printf("%c", ans[i]);
return 0;
}