結果
問題 | No.400 鏡 |
ユーザー |
![]() |
提出日時 | 2017-03-10 01:10:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 490 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 65,848 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 00:26:11 |
合計ジャッジ時間 | 1,181 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
ソースコード
#include <iostream> using namespace std; int swap(string s,int n){ char tmp; for(int i = 0; i <= n/2; i++){ tmp = s[n-i]; s[n-i] = s[i]; s[i] = tmp; } for(int i = 0; i <= n; i++){ if(s[i] == '<'){ cout << '>'; }else if(s[i] == '>'){ cout << '<'; } } cout << "\n"; return 0; } int main(void){ string s; char tmp; cin >> s; int n = s.length(); swap(s,n); return 0; }