結果
問題 | No.400 鏡 |
ユーザー |
![]() |
提出日時 | 2017-07-14 21:07:33 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 252 bytes |
コンパイル時間 | 403 ms |
コンパイル使用メモリ | 54,700 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-07 21:54:31 |
合計ジャッジ時間 | 956 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%s", s); | ~~~~~^~~~~~~~~
ソースコード
#include<iostream>#include<cstdio>#include<cstring>using namespace std;int main() {char s[21];scanf("%s", s);for (int i = strlen(s) - 1; i >= 0; i--){char t = (s[i] == '<') ? '>' : '<';printf("%c", t);}printf("\n");return 0;}