結果

問題 No.163 cAPSlOCK
ユーザー waywaywaiwai
提出日時 2017-07-21 15:52:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 578 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 55,224 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-09 03:33:22
合計ジャッジ時間 1,577 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>

using namespace std;

int main(){
    char smallalph[]="abcdefghijklmnopqrstuvwxyz"
    , bigalph[]="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	, inputalph[101],outputalph[101];
    int inputLength = 0, i,j;

    cin >> inputalph;
    while(inputalph[inputLength] != '\0'){
	inputLength++;
    }
    for(i=0;i<inputLength;i++){
	for(j=0;j<26;j++){
	    if(smallalph[j] == inputalph[i]){
		outputalph[i] = bigalph[j];
	    }else if(bigalph[j] == inputalph[i]){
		outputalph[i] = smallalph[j];
	    }
	}
    }
    cout << outputalph << endl;
    return 0;
}
0