結果

問題 No.2460 #強調#
ユーザー forest3
提出日時 2023-09-27 00:37:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 280 bytes
コンパイル時間 1,700 ms
コンパイル使用メモリ 166,772 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 18:18:02
合計ジャッジ時間 2,336 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	string s, ans;
	cin >> s;
	int N = s.size();
	int f = 0;
	for( int i = 0; i < N; i++ ) {
		if( f ) ans += s[i];
		if( s[i] == '#' ) {
			if( f == 0 ) f = 1;
			else break;
		}
	}
	ans.pop_back();
	cout << ans << endl;
}
0