結果
| 問題 |
No.1362 [Zelkova 8th Tune] Black Sheep
|
| コンテスト | |
| ユーザー |
🍮かんプリン
|
| 提出日時 | 2021-01-22 21:26:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 1,000 ms |
| コード長 | 472 bytes |
| コンパイル時間 | 1,640 ms |
| コンパイル使用メモリ | 165,580 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-27 21:10:50 |
| 合計ジャッジ時間 | 3,188 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
/**
* @FileName a.cpp
* @Author kanpurin
* @Created 2021.01.22 21:26:41
**/
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
int main() {
string s;cin >> s;
if (s[0] != s[1] && s[1] == s[2]) {
cout << 1 << " " << s[0] << endl;
return 0;
}
for (int i = 0; i < s.size()-1; i++) {
if (s[i] != s[i+1]) {
cout << i+2 << " " << s[i+1] << endl;
break;
}
}
return 0;
}
🍮かんプリン