結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2019-03-07 10:42:19 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 223 ms / 2,000 ms |
コード長 | 474 bytes |
コンパイル時間 | 613 ms |
コンパイル使用メモリ | 56,268 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-23 14:47:10 |
合計ジャッジ時間 | 1,660 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <iostream>typedef long long ll;using namespace std;ll pow(ll k,ll n) {ll s=1;for(ll i=0;i<n;i++) {s*=k;}return s;}int main(){int n;ll k=1;cin >> n;for(int i = 0; i < n - 1; i++){cout << "a";for(int j = 1; j <= 18; j++){cout << char('a' + k / pow(26,(ll)j) % 26);}k+=26;cout << "a" << endl;}cout << "an" << endl;return 0;}