結果
問題 | No.668 6.0*10^23 |
ユーザー |
|
提出日時 | 2020-07-18 00:04:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-11-30 05:20:17 |
合計ジャッジ時間 | 3,173 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
from decimal import Decimal, ROUND_HALF_UP def main(): N = input() core = int(N[:3]) round_n = int(Decimal(core).quantize(Decimal('1E1'), rounding=ROUND_HALF_UP)) if 995 <= core <= 999: ans_1 = 1.0 ans_2 = len(N) else: ans_1 = round_n / 10 ** 2 ans_2 = len(N) - 1 print(str(ans_1)+'*10^'+str(ans_2)) if __name__ == '__main__': main()