結果
問題 | No.701 ひとりしりとり |
ユーザー |
|
提出日時 | 2018-06-16 11:19:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 471 ms |
コンパイル使用メモリ | 64,728 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 16:11:21 |
合計ジャッジ時間 | 2,235 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 11 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { int n; cin>>n; int m=20; char ch='a'; int i,j; char ch1=ch; for (i=0;i<n;i++){ for (j=0;j<20;j++){ if (j==0){ cout<<ch1; continue; } int index=(i+j)%26; if (ch+index>'z'){ ch='a'; } cout<<char(ch+index); ch1=ch+index; if (ch1=='n'){ cout<<endl; return 0; } } cout<<endl; } return 0; }