2 solutions

  • 0
    @ 2024-7-20 20:40:21

    int上限是2147483647,乘积最大是2500000000

    所以要开long long(题目也提醒过)

    #include<bits/stdc++.h>
    using namespace std;
    long long a,b;
    int main(){
    	cin>>a>>b;
    	cout<<a*b;
    	return 0;
    }
    
    • 0
      @ 2024-7-20 20:36:09
      #include<bits/stdc++.h>
      #define ll long long
      
      using namespace std;
      
      int main(){
      	ll a, b;
      	cin >> a >> b;
      	cout << a* b;
      	return 0;
      }
      
      • 1

      Information

      ID
      6877
      Time
      1000ms
      Memory
      128MiB
      Difficulty
      1
      Tags
      # Submissions
      13
      Accepted
      6
      Uploaded By