結果
問題 |
No.18 うーさー暗号
|
ユーザー |
![]() |
提出日時 | 2017-01-10 22:20:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 223 bytes |
コンパイル時間 | 259 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-18 00:59:59 |
合計ジャッジ時間 | 916 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:11:16: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 11 | for(i=0,b=1;i<=strlen(a);i++,b++){ | ^~~~~~ main.c:2:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ 1 | #include<stdio.h> +++ |+#include <string.h> 2 | main.c:11:16: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch] 11 | for(i=0,b=1;i<=strlen(a);i++,b++){ | ^~~~~~ main.c:11:16: note: include ‘<string.h>’ or provide a declaration of ‘strlen’ main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s",a); | ^~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(){ char a[1024]; int i; int d; int b; scanf("%s",a); for(i=0,b=1;i<=strlen(a);i++,b++){ if(b>25){ d=(25-i)*-1; printf("%c",a[i]-d); } printf("%c",a[i]-b); } return 0; }