結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
jolly_gliscor
|
| 提出日時 | 2018-02-22 18:08:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 473 bytes |
| コンパイル時間 | 783 ms |
| コンパイル使用メモリ | 42,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 00:45:21 |
| 合計ジャッジ時間 | 1,117 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:27:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
27 | scanf("%s",password);
| ~~~~~^~~~~~~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <string>
void ConvertUL(char *str)
{
for(int i=0;;i++){
if (str[i] == '\0'){
break;
}
if (isupper(str[i])){
printf("%c",tolower(str[i]));
}else if (islower(str[i])){
printf("%c",toupper(str[i]));
}else{
printf("%c",str[i]);
}
}
printf("\n");
}
int main(void)
{
char password[100];
scanf("%s",password);
ConvertUL(password);
return 0;
}
jolly_gliscor