結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2018-02-14 22:42:27 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 20,736 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 08:31:14 |
| 合計ジャッジ時間 | 975 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <ctype.h>
#include <string.h>
int main(void)
{
char s[101];
int i;
scanf("%s",s);
for(i=0;i<strlen(s);i++){
if(s[i]>='a'&&s[i]<='z'){
toupper(s[i]);
printf("%c",s[i]);
}else if(s[i]>='A'&&s[i]<='Z'){
tolower(s[i]);
printf("%c",s[i]);
}
}
printf("\n");
return 0;
}
Haijinn