From c30fcc30d06677817aa453bc582f295b65b8de4b Mon Sep 17 00:00:00 2001 From: xingyou wu <3050128610@qq.com> Date: Sat, 29 Mar 2025 17:14:53 +0800 Subject: [PATCH] =?UTF-8?q?lanqiao=202098=20=E5=88=B7=E9=A2=98=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1(=E6=9E=9A=E4=B8=BE=E6=B3=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 13lanqiao/test3.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 13lanqiao/test3.cpp diff --git a/13lanqiao/test3.cpp b/13lanqiao/test3.cpp new file mode 100644 index 0000000..271a812 --- /dev/null +++ b/13lanqiao/test3.cpp @@ -0,0 +1,21 @@ +// lanqiao 2098 刷题统计(枚举法) +#include +using namespace std; +#define int long long +signed main(){ + int a, b, n; cin >> a >> b >> n; + int sum = 0, i; + for(i = 1; ;i++){ + if(i % 7 != 0 && i % 7 != 6){ + sum += a; + }else{ + sum += b; + } + if(sum >= n) break; + } + cout << i << endl; + return 0; +} +/* test samples -> 8 +10 20 99 +*/ \ No newline at end of file