結果

問題 No.722 100×100=1000
ユーザー kobaya0514kobaya0514
提出日時 2018-08-03 23:17:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 519 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-20 15:03:40
合計ジャッジ時間 1,940 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 28 ms
10,752 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 29 ms
10,880 KB
testcase_07 AC 29 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 30 ms
10,752 KB
testcase_10 AC 30 ms
10,752 KB
testcase_11 WA -
testcase_12 AC 29 ms
10,752 KB
testcase_13 AC 29 ms
10,624 KB
testcase_14 AC 28 ms
10,752 KB
testcase_15 WA -
testcase_16 AC 29 ms
10,624 KB
testcase_17 AC 30 ms
10,752 KB
testcase_18 AC 30 ms
10,752 KB
testcase_19 AC 29 ms
10,752 KB
testcase_20 AC 30 ms
10,752 KB
testcase_21 WA -
testcase_22 AC 28 ms
10,752 KB
testcase_23 AC 29 ms
10,752 KB
testcase_24 AC 29 ms
10,752 KB
testcase_25 AC 28 ms
10,880 KB
testcase_26 AC 28 ms
10,752 KB
testcase_27 AC 29 ms
10,752 KB
testcase_28 AC 30 ms
10,752 KB
testcase_29 AC 29 ms
10,880 KB
testcase_30 AC 29 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A,B=map(int,input().split())

def check(x,y):
  a=x
  b=y
  n,m=0,0
  while a>0:
    if a%10==0:
      a/=10
      n+=1
    elif a%10!=0 and (n<2 or a>10):
      return [0,0,0,0]
    else:
      break
  while b>0:
    if b%10==0:
      b/=10
      m+=1
    elif b%10!=0 and (m<2 or b>10):
      return [0,0,0,0]
    else:
      break
  return [a,b,n,m]

ans=check(A,B)
if ans[0]==0:
  if -99999999 <= A*B <= 99999999:
    print(int(A*B))
  else:
    print("E")
else:
  print(int(ans[0]*ans[1]*(10**(ans[2]+ans[3]-1))))
0