結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
tottoripaper
|
| 提出日時 | 2015-03-12 23:22:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 327 bytes |
| コンパイル時間 | 618 ms |
| コンパイル使用メモリ | 53,732 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-24 19:59:40 |
| 合計ジャッジ時間 | 1,383 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%s", S);
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
int main(){
char S[110];
scanf("%s", S);
int L = strlen(S);
for(int i=0;i<L;i++){
if('a' <= S[i] && S[i] <= 'z'){
putchar(std::toupper(S[i]));
}else{
putchar(std::tolower(S[i]));
}
}
puts("");
}
tottoripaper