結果
| 問題 | No.327 アルファベット列 |
| コンテスト | |
| ユーザー |
Deep_Instead
|
| 提出日時 | 2016-01-31 18:25:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 459 ms |
| コンパイル使用メモリ | 55,052 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-21 19:42:19 |
| 合計ジャッジ時間 | 1,501 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 50 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:8: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
9 | s[11]='\0';
| ~~~~~^~~~~
main.cpp:7:8: note: at offset 11 into destination object ‘s’ of size 11
7 | char s[11];
| ^
ソースコード
#include <iostream>
using namespace std;
int main()
{
long long n;
char s[11];
cin >> n;
s[11]='\0';
s[10]='A'+n%26;
n/=26;
int i=0;
for(;n>0;n/=26)
{
++i;
s[10-i]='A'+n%26;
}
cout << (s+10-i) << endl;
return 0;
}
Deep_Instead