結果

問題 No.2796 Small Matryoshka
ユーザー KDKJ
提出日時 2024-06-28 22:57:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 772 ms
コンパイル使用メモリ 82,132 KB
実行使用メモリ 100,864 KB
最終ジャッジ日時 2024-06-28 22:57:40
合計ジャッジ時間 6,670 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #





def main():
    
    N = int(input())
    array = [list(map(int,input().split())) for _ in range(N)]
    
    array.sort(key = lambda x:-x[0])
    now = array[0][0]
    ans = 0
    for r,R in array[1:]:
        if R <= now:
            now = r
        else:
            ans += 1
            now = r *now/R
    print(ans)
    


if __name__ == '__main__':
    main()


0