結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-16 18:20:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 22,528 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-21 14:33:33 |
| 合計ジャッジ時間 | 1,214 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",S);
| ~~~~~^~~~~~~~
ソースコード
#include <stdio.h>
int main(){
//input
char S[100+1];
scanf("%s",S);
//current password
char cPass[100+1];
for (int i = 0;i < 100+1;i++){
if (S[i] != '\0'){
if (S[i] < 97){
cPass[i] = S[i]+32;
}else{
cPass[i] = S[i]-32;
}
}else{
cPass[i] = '\0';
break;
}
}
//output
printf("%s\n",cPass);
return 0;
}