結果
問題 |
No.1010 折って重ねて
|
ユーザー |
|
提出日時 | 2020-03-20 22:04:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 481 bytes |
コンパイル時間 | 350 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-15 05:55:56 |
合計ジャッジ時間 | 2,461 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 43 |
ソースコード
from math import log2,floor,ceil x,y,h = map(int,input().split()) x *= 1000 y *= 1000 l = ceil(log2(x/h)) r = ceil(log2(y/h)) lup = floor(log2(x/h)+2) rup = floor(log2(y/h)+2) lis1 = [i for i in range(l,lup+1)] lis2 = [i for i in range(r,rup+1)] ans = 0 for p in lis1: for q in lis2: a = 2*p-q b = 2*q-p if a%3!=0 or b%3 != 0:continue else: a //=3;b//=3 if a >= 0 and b >= 0: ans = max(ans,a+b) print(ans)