結果

問題 No.495 (^^*) Easy
ユーザー kotatsugamekotatsugame
提出日時 2017-03-24 22:26:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 65,428 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 02:54:23
合計ジャッジ時間 961 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
main()
{
	string t;cin>>t;int cntr=0,cntl=0;
	for(int i=0;i<t.length()-1;i++)
	{
		cntl+=t[i]=='^'&&t[i+1]=='*';
		cntr+=t[i]=='*'&&t[i+1]=='^';
	}
	cout<<cntl<<" "<<cntr<<endl;
}
0