結果

問題 No.701 ひとりしりとり
ユーザー ohreitetsuohreitetsu
提出日時 2018-06-16 11:22:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 64,040 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-13 06:00:38
合計ジャッジ時間 2,393 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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<19;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;
		}
		cout<<endl;
		if (ch1=='n'){
			return 0;
		}
	}
	return 0;
}
0