結果
問題 | No.600 かい文回 |
ユーザー |
![]() |
提出日時 | 2020-03-16 17:07:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 449 bytes |
コンパイル時間 | 1,603 ms |
コンパイル使用メモリ | 170,372 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-28 02:54:15 |
合計ジャッジ時間 | 2,567 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int n; string solve(); int main() { cin >> n; cout << solve() << endl; return 0; } string solve() { if(n == 1) return "z"; string res = "z"; int nxt = 0; for(int i = 62 - __builtin_clzll(n); i >= 0; --i) { res = res[0] + res + res[0]; if(n >> i & 1) { string tmp; tmp += (char)('a' + nxt); res = tmp + res + tmp; (++nxt) %= 26; } } return res; }