結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2018-08-03 23:00:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 624 bytes |
| コンパイル時間 | 211 ms |
| コンパイル使用メモリ | 82,316 KB |
| 実行使用メモリ | 54,104 KB |
| 最終ジャッジ日時 | 2024-10-12 10:41:59 |
| 合計ジャッジ時間 | 2,450 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 WA * 6 |
ソースコード
#!/usr/bin/env pypy3
CALC_LIMIT = 99999999
def by_hand(x, y):
return x * y // 10
def by_calc(x, y):
res = x * y
if abs(res) > CALC_LIMIT:
return None
else:
return res
def judge(x):
s = str(abs(x))
return s[0] in "123456789" and all(d == "0" for d in s[1:])
def solve(x, y):
if judge(x) and judge(y):
res = by_hand(x, y)
else:
res = by_calc(x, y)
return res
def main():
x, y = (int(z) for z in input().split())
res = solve(x, y)
if res is None:
print("E")
else:
print(res)
if __name__ == '__main__':
main()
はむ吉🐹