結果

問題 No.2322 MMA文字列
ユーザー katonyonkokatonyonko
提出日時 2023-05-28 13:31:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 929 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 71,652 KB
最終ジャッジ日時 2023-08-27 07:54:12
合計ジャッジ時間 2,857 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,528 KB
testcase_01 AC 72 ms
71,408 KB
testcase_02 AC 72 ms
71,380 KB
testcase_03 AC 72 ms
71,500 KB
testcase_04 AC 73 ms
71,592 KB
testcase_05 AC 72 ms
71,468 KB
testcase_06 AC 72 ms
71,456 KB
testcase_07 AC 72 ms
71,432 KB
testcase_08 AC 72 ms
71,128 KB
testcase_09 AC 72 ms
71,316 KB
testcase_10 AC 71 ms
71,652 KB
testcase_11 AC 71 ms
71,300 KB
testcase_12 AC 72 ms
71,296 KB
testcase_13 AC 72 ms
71,244 KB
testcase_14 AC 72 ms
71,120 KB
testcase_15 AC 70 ms
71,496 KB
testcase_16 AC 71 ms
71,388 KB
testcase_17 AC 70 ms
71,608 KB
testcase_18 AC 71 ms
71,240 KB
testcase_19 AC 72 ms
71,316 KB
testcase_20 AC 72 ms
71,468 KB
testcase_21 AC 73 ms
71,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import io
import sys

_INPUT = """\
6
MMA
UEC
"""

def solve(test):
  S=input()
  if S[0]==S[1] and S[1]!=S[2]: ans='Yes'
  else: ans='No'
  if test==0:
    print(ans)
  else:
    return None

def random_input():
  from random import randint,shuffle
  N=randint(1,10)
  M=randint(1,N)
  A=list(range(1,M+1))+[randint(1,M) for _ in range(N-M)]
  shuffle(A)
  return (" ".join(map(str, [N,M]))+"\n"+" ".join(map(str, A))+"\n")*3

def simple_solve():
  return []

def main(test):
  if test==0:
    solve(0)
  elif test==1:
    sys.stdin = io.StringIO(_INPUT)
    case_no=int(input())
    for _ in range(case_no):
      solve(0)
  else:
    for i in range(1000):
      sys.stdin = io.StringIO(random_input())
      x=solve(1)
      y=simple_solve()
      if x!=y:
        print(i,x,y)
        print(*[line for line in sys.stdin],sep='')
        break

#0:提出用、1:与えられたテスト用、2:ストレステスト用
main(0)
0