結果
問題 |
No.327 アルファベット列
|
ユーザー |
![]() |
提出日時 | 2016-03-03 19:11:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 433 bytes |
コンパイル時間 | 500 ms |
コンパイル使用メモリ | 36,992 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 13:52:02 |
合計ジャッジ時間 | 1,978 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 6 WA * 44 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf( "%lld", &N ); | ~~~~~^~~~~~~~~~~~~~
ソースコード
// yukicoder 327 (http://yukicoder.me/problems/904) #include<cstdio> #include<vector> #define repd(i,a) for(int i=(a);i>=0;--i) typedef long long ll; ll N; std::vector<int> vs; int main() { scanf( "%lld", &N ); if( !N ) { puts("A"); return 0; } bool fl = false; while( N > 0 ) vs.push_back( N%(26+fl) ), N /= (26+fl), fl = true; repd( i, vs.size()-1 ) putchar( 'A'+vs[i]-(i==vs.size()-1) ); puts(""); return 0; }