結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2017-02-16 15:11:00 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 226 bytes |
コンパイル時間 | 143 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 06:25:05 |
合計ジャッジ時間 | 641 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:11: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[1024]’ [-Wformat=] 5 | scanf("%s",&aa); | ~^ ~~~ | | | | | char (*)[1024] | char * main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%s",&aa); | ^~~~~~~~~~~~~~~
ソースコード
#include "stdio.h"int main(void) {int i,j,bb;char aa[1024];scanf("%s",&aa);for(i=0;i<1024;i++){if(aa[i]=='\0')break;aa[i]-=(i+1)%26;if(aa[i]<'A')aa[i]+=26;}printf("%s",aa);return 0;}