結果

問題 No.1362 [Zelkova 8th Tune] Black Sheep
ユーザー vkgainz
提出日時 2021-06-12 08:11:22
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 401 bytes
コンパイル時間 2,084 ms
コンパイル使用メモリ 160,600 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 22:21:31
合計ジャッジ時間 4,103 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#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";
    }
    for(int i = 1; i < (int) S.length(); i++) {
        if(S[i] != S[0]) {
            cout << i + 1 << " " << S[i] << "\n";
            return 0;
        }
    }
}
0