結果
問題 | No.1362 [Zelkova 8th Tune] Black Sheep |
ユーザー |
![]() |
提出日時 | 2025-03-26 15:43:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 1,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 184 ms |
コンパイル使用メモリ | 82,216 KB |
実行使用メモリ | 61,984 KB |
最終ジャッジ日時 | 2025-03-26 15:43:19 |
合計ジャッジ時間 | 2,865 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
s = input().strip()# Determine the majority characterif s[0] == s[1]:majority = s[0]else:if s[2] == s[0]:majority = s[0]else:majority = s[1]# Find the differing character and its positionfor idx, c in enumerate(s):if c != majority:print(idx + 1, c)break