結果
問題 |
No.722 100×100=1000
|
ユーザー |
![]() |
提出日時 | 2018-08-03 22:38:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 656 bytes |
コンパイル時間 | 291 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-10-12 10:37:50 |
合計ジャッジ時間 | 4,154 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 9 TLE * 1 -- * 17 |
ソースコード
#!/usr/bin/env python3 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): x = abs(x) n = 0 while x % 10 == 0: x //= 10 n += 1 return 1 <= x <= 9 and n >= 2 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()