結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
Baku_beanpole
|
| 提出日時 | 2016-01-21 13:49:22 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 243 bytes |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-21 14:56:14 |
| 合計ジャッジ時間 | 887 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%s", pass);
| ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
char pass[100];
scanf("%s", pass);
int i = 0;
while(pass[i] != '\0'){
if(pass[i] > 96){
pass[i] = pass[i] - 32;
}else{
pass[i] = pass[i] + 32;
}
i++;
}
printf("%s\n", pass);
return 0;
}
Baku_beanpole