2 条题解

  • 1
    @ 2025-9-18 20:58:57
    #include<queue>
    #include<math.h>
    #include<stdio.h>
    #include<iostream>
    #include<vector>
    #include<iomanip>
    #include<string.h>
    #include<algorithm>
    #include<cmath>
    #include<cstdio>
    #include<utility>
    #include<cstring>
    #include<stack>
    #include<fstream>
    #include<string>
    using namespace std;
    #define LL long long
    const int N = 1e5 + 10;
    const int INF = 0x3f3f3f3f;
    int n , t , ans = 0;
    double a;
    int main()
    {
    	cin >> n;
    	for ( int i = 1 ; i <= n ; i++ )
    	{
    		cin >> a >> t;
    		for ( int j = 1 ; j <= t ; j++ )
    		{
    			ans = ans ^ int( a * j );
    		}
    	}
    	cout << ans;
    	return 0;
    }
    
    • -1
      @ 2022-8-26 18:10:35
      #include<bits/stdc++.h>
      using namespace std;
      int n,t,ans=0;
      double a;
      int main(){
      	cin>>n;
      	for(int i=1;i<=n;i++){
      		cin>>a>>t;
      		for(int j=1;j<=t;j++){
      			ans=ans^int(a*j);
      		}
      	}
      	cout<<ans;
      	return 0;
      }
      
      • 1

      信息

      ID
      2556
      时间
      1000ms
      内存
      256MiB
      难度
      7
      标签
      递交数
      178
      已通过
      45
      上传者