結果

問題 No.341 沈黙の期間
ユーザー tonegawa
提出日時 2020-08-15 10:45:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 948 ms
コンパイル使用メモリ 66,432 KB
最終ジャッジ日時 2025-01-13 01:13:16
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 2 WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:11:29: warning: multi-character character constant [-Wmultichar]
   11 |                 if (S[i] == '…'){
      |                             ^~~

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;
int main(){
	string S;
	cin >> S;
	int N = S.size();
	int ans = 0;
	int c = 0;
	for (int i = 0; i < N; i++){
		if (S[i] == '…'){
			c++;
			ans = max(ans, c);
		} else {
			c = 0;
		}
	}
	cout << ans << endl;
}
0