結果
| 問題 |
No.163 cAPSlOCK
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-11-30 03:32:38 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 405 bytes |
| コンパイル時間 | 582 ms |
| コンパイル使用メモリ | 60,488 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 05:20:46 |
| 合計ジャッジ時間 | 1,310 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
#define DIFF ('A'-'a')
int main(){
ios::sync_with_stdio(false);
vector<char> s;
char input='\0';
while(input!='\n'){
cin.get(input);
if(input>='a' && input <='z') input+=DIFF;
else if(input>='A' && input <='Z') input-=DIFF;
s.push_back(input);
}
for(int i=0; i<s.size(); ++i){
cout << s[i];
}
return 0;
}