結果
| 問題 |
No.722 100×100=1000
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-18 14:35:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 630 bytes |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-06-28 22:46:28 |
| 合計ジャッジ時間 | 2,314 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
def int_to_exp_representation(num: int) -> tuple[int, int]:
exp_ = 0
while abs(num) >= 10 and num % 10 == 0:
num //= 10
exp_ += 1
return num, exp_
def main():
A, B = map(int, input().split())
A_mantissa, A_exp = int_to_exp_representation(A)
B_mantissa, B_exp = int_to_exp_representation(B)
if abs(A_mantissa) < 10 and abs(B_mantissa) < 10 and A_exp >= 2 and B_exp >= 2:
print(A*B//10)
return
calculator_result = A * B
if abs(calculator_result) > 99999999:
print("E")
else:
print(calculator_result)
if __name__ == "__main__":
main()