1 条题解

  • 0
    @ 2026-8-21 16:21:03

    #include using namespace std;

    int main() { string n; long long x, y, a, b = 0; cin >> x >> n;

    int l = n.size();
    
    
    if (n == "GiB") {
    	cout << x * 1024 * 1024 * 1024;
    }
    if (n == "MiB") {
    	cout << x * 1024 * 1024;
    }
    if (n == "KiB") {
    	cout << x * 1024;
    }
    
    
    if (n == "GB") {
    	cout << x * 1000 * 1000 * 1000;
    }
    if (n == "MB") {
    	cout << x * 1000 * 1000;
    }
    if (n == "KB") {
    	cout << x * 1000;
    
    }
    
    return 0;
    

    }

    • 1

    信息

    ID
    31301
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    79
    已通过
    25
    上传者