結果
問題 |
No.1010 折って重ねて
|
ユーザー |
![]() |
提出日時 | 2020-11-28 23:30:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 546 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-09-13 01:41:04 |
合計ジャッジ時間 | 3,028 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 43 |
ソースコード
import math def counter_n(atumi,haba): countest=0 while haba > atumi: atumi=atumi*2 haba=haba/2 countest=countest+1 return countest x,y,h = map(int,input().split(" ")) x= x*1000 y=y*1000 counter = 0 if x ==y: counter=counter_n(h,x) h= int(h*math.pow(2,counter)) counter=counter+counter_n(h,y) elif x > y: counter=counter_n(h,y) h= int(h*math.pow(2,counter)) if h <x: counter=counter+counter_n(h,x) elif x < y: counter=counter_n(h,x) h= int(h*math.pow(2,counter)) if h <y: counter=counter+counter_n(h,y) print(counter)