結果
| 問題 |
No.2460 #強調#
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-23 23:12:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 607 ms |
| コンパイル使用メモリ | 68,640 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-07-23 23:12:41 |
| 合計ジャッジ時間 | 1,529 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
getline(cin, S);
int pos1 = S.find('#');
int pos2 = S.find('#', pos1 + 1);
if (pos1 != string::npos && pos2 != string::npos && pos2 > pos1 + 1) {
cout << S.substr(pos1 + 1, pos2 - pos1 - 1) << endl;
} else {
// Nếu hai dấu # liền nhau, in dòng trống
cout << endl;
}
return 0;
}