結果
問題 | No.701 ひとりしりとり |
ユーザー |
![]() |
提出日時 | 2018-08-22 10:58:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 570 bytes |
コンパイル時間 | 655 ms |
コンパイル使用メモリ | 64,128 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 13:36:52 |
合計ジャッジ時間 | 6,281 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 8 OLE * 1 |
ソースコード
#include<iostream> #include<string> using ll = long long; using namespace std; int main(){ char table[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; ll n; cin >> n; for(ll i=2;;i++){ ll top=0; do{ string str; for(ll j=0;j<i;j++) cout << table[(j+top)%26]; if(!--n){ cout << "n\n"; return 0; } cout << endl; top+=(i-1); }while(top%26!=0); } return 0; }