2 条题解

  • 1
    @ 2024-10-21 21:47:44

    纯找规律

    第y小时剩的=n-(y/x)-1

    AC code:

    #include<bits/stdc++.h>
    using namespace std;
    int n,x,y;
    int main() 
    {
    	cin>>n>>x>>y;
    	cout<<n-(y/x)-1; 
    	return 0;
    }
    
    • 0
      @ 2024-10-18 23:03:04

      思路

      工作时间(吃了的时间)*工作效率(吃的速度)=工作总量(吃的总个数)
      总个数-吃的总个数-1=完整的苹果
      小学五年级数学题

      题解

      #include <iostream>
      #include <cstdio>
      using namespace std;
      int main()
      {
          int n,x,y;
          cin>>n>>x>>y;
          int temp=y/x;
          cout<<n-temp-1;
          return 0;
      }
      
      • 1

      信息

      ID
      24
      时间
      1000ms
      内存
      256MiB
      难度
      1
      标签
      递交数
      51
      已通过
      29
      上传者