結果

問題 No.18 うーさー暗号
ユーザー a2011404a2011404
提出日時 2017-03-14 11:46:55
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 24,096 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-12 12:20:30
合計ジャッジ時間 903 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>
#include <string.h>


int main(void)
{
	int i;
	char c[1025];
	
	fgets(c,sizeof(c),stdin);


/*配列の中身
	for(i=0;i<strlen(c)-1;i++){
		printf("c[%d]=%c\n",i,c[i]);
	}
*/

	for(i=0;i<strlen(c);i++){
		if(c[i]-((i+1)%26) >= 'A'){
			printf("%c",c[i]-(i+1)%26);
		}else	printf("%c",c[i]-(i%26-('Z'-'A')));
	}

	return 0;
}
0