結果
問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
ユーザー |
|
提出日時 | 2021-06-12 08:11:59 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 1,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 2,561 ms |
コンパイル使用メモリ | 163,152 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-15 22:22:18 |
合計ジャッジ時間 | 3,597 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int pos = 0; if(S[0] != S[1]) { if(S[0] == S[2]) cout << 2 << " " << S[1] << "\n"; else cout << 1 << " " << S[0] << "\n"; return 0; } for(int i = 1; i < (int) S.length(); i++) { if(S[i] != S[0]) { cout << i + 1 << " " << S[i] << "\n"; return 0; } } }