結果
問題 |
No.2460 #強調#
|
ユーザー |
|
提出日時 | 2023-10-04 16:50:53 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 1,561 ms |
コンパイル使用メモリ | 119,168 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-26 14:48:05 |
合計ジャッジ時間 | 2,542 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <iostream> #include <string> int main() { std::string S; std::cin >> S; size_t left = S.find('#'); size_t right = S.rfind('#'); if (left != std::string::npos && right != std::string::npos && left < right) { std::string ans = S.substr(left + 1, right - left - 1); std::cout << ans << std::endl; } return 0; }