6 条题解

  • 0
    @ 2025-8-5 11:31:14

    都不想写 using namespace 了。

    #include <iostream>
    #include <cmath>
    int main()
    {
    	int d;
    	char c;
    	std::cin >> d >> c;
    	std::cout << 8 + ceil(std::max(0, d - 1000) / 500.0) * 4 + (c =='y' ? 5 : 0) << std::endl;
    	return 0;
    }
    

    信息

    ID
    25
    时间
    1000ms
    内存
    128MiB
    难度
    1
    标签
    (无)
    递交数
    43
    已通过
    36
    上传者