結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2015-09-24 11:43:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 598 bytes |
コンパイル時間 | 442 ms |
コンパイル使用メモリ | 66,356 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 08:59:26 |
合計ジャッジ時間 | 1,086 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:25:9: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 25 | scanf("%s",s); | ~~~~~^~~~~~~~
ソースコード
#include <iostream> #include <vector> #include <string> #include <cstring> #include <algorithm> #include <sstream> #include <map> #include <set> using namespace std; #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) typedef long long ll; typedef unsigned long long ull; typedef long double lb; /* ここからが本編 */ int main(void) { int i,j,k,l; char s[105]; scanf("%s",s); for(i = 0;s[i];i++) { if('a' <= s[i] && s[i] <= 'z') s[i] = toupper(s[i]); else if('A' <= s[i] && s[i] <= 'Z') s[i] = tolower(s[i]); } cout << s << endl; return 0; }