結果
問題 | No.163 cAPSlOCK |
ユーザー |
![]() |
提出日時 | 2017-02-04 01:12:21 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 172 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 06:00:36 |
合計ジャッジ時間 | 2,345 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 RE * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[50]’ [-Wformat=] 5 | scanf("%s",&bun); | ~^ ~~~~ | | | | | char (*)[50] | char * main.c:7:13: warning: implicit declaration of function ‘abs’ [-Wimplicit-function-declaration] 7 | bun[i]+=-32*abs(bun[i]-95)/(bun[i]-95); | ^~~ main.c:2:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘abs’ 1 | #include <stdio.h> +++ |+#include <stdlib.h> 2 | int main(){ main.c:5:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%s",&bun); | ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int i=0; char bun[50]; scanf("%s",&bun); while(bun[i]!='\0'){ bun[i]+=-32*abs(bun[i]-95)/(bun[i]-95); i++; } printf("%s\n",bun); return 0; }