結果
| 問題 |
No.1362 [Zelkova 8th Tune] Black Sheep
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2021-01-23 01:20:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 1,000 ms |
| コード長 | 433 bytes |
| コンパイル時間 | 1,875 ms |
| コンパイル使用メモリ | 165,464 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 08:02:28 |
| 合計ジャッジ時間 | 3,301 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
using ll=long long;
using Graph=vector<vector<int>>;
#define MOD 998244353
#define INF 1000000000000000000
#define MAX 2000
int main(){
string S;
cin>>S;
char c;
if(S[0]==S[1]){
c=S[0];
}else if(S[1]==S[2]){
c=S[1];
}else{
c=S[0];
}
int i=0;
while(S[i]==c){
i++;
}
cout<<i+1<<" "<<S[i]<<endl;
}
monnu