跳到正文

题解

P15192 [SWERC 2019] Rats 题解

duminghao123约 1 分钟
原文
文章信息与版本

文章信息

发布
2026年2月5日
收录
2026年6月13日
更新
2026年11月19日
篇幅
约 1 分钟
获赞
1
题目
P15192

版本

  1. v1当前

P15192 [SWERC 2019] Rats 题解

思路

没什么特别的,按照题目说的公式做即可。注意到 int 可以直接向下取整。

AC Code

C++
#include<bits/stdc++.h>
using namespace std;
double n1,n2,n12;
int main(){
    cin>>n1>>n2>>n12;
    cout<<(int)((n1+1.0)*(n2+1.0)/(n12+1.0)-1);
}
原文