結果
問題 |
No.327 アルファベット列
|
ユーザー |
|
提出日時 | 2016-01-01 03:32:07 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 846 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 09:04:13 |
合計ジャッジ時間 | 1,848 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 31 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:37:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 37 | scanf("%d",&n); | ^~~~~~~~~~~~~~
ソースコード
/* * this is the program which * convert NUM to STRING * * 0 ... 25 * A ... Z * * 26 ... 51 <-- INPUT * AA ... AZ <-- OUTPUT * * .. ... .. * * 676 ... 701 * ZA ... ZZ * * 702 ... * AAA ... */ #include<stdio.h> #include<string.h> void loop(int n) { if (n>25){ loop(n/26-1); printf("%c",'A'+n%26); }else printf("%c",'A'+n); } int main( ) { int n; scanf("%d",&n); loop(n); printf("\n"); return 0; }