結果
問題 | No.400 鏡 |
ユーザー |
|
提出日時 | 2016-11-15 23:59:31 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 264 bytes |
コンパイル時間 | 373 ms |
コンパイル使用メモリ | 53,760 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-26 01:56:48 |
合計ジャッジ時間 | 915 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:11:34: warning: NULL used in arithmetic [-Wpointer-arith] 11 | if (letter[i] != NULL) { | ^~~~
ソースコード
#include "iostream"using namespace std;char letter[21];char ans[21];int j;int main() {cin >> letter;for (int i = 20; i >= 0; i--) {if (letter[i] != NULL) {if (letter[i] == '>')ans[j++] = '<';else ans[j++] = '>';}}cout << ans << "\n";}