結果

問題 No.163 cAPSlOCK
ユーザー maicunemaicune
提出日時 2019-08-27 19:27:05
言語 C++11
(gcc 11.4.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 270 bytes
コンパイル時間 1,307 ms
コンパイル使用メモリ 159,020 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-28 10:21:45
合計ジャッジ時間 12,300 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s,t,ans;
    cin>>s;
    transform(s.begin(),s.end(),t.begin(),::toupper);
    for(int i=0;i<s.size();++i){
        if(s[i]==t[i])ans+=tolower(t[i]);
        else ans+=t[i];
    }
    cout<<ans<<endl;
}
0