U432117 A ? B Problem

· · 个人记录

U432117 A ? B Problem 题解

小芝士知识

注意到

((int)(`1`)) \oplus 48=49\ \oplus\ 48 = 1 a\ \&\ 9223372036854775807=a(a\in \text{long long范围}) \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{2n-1} \ a ^{2n-1}=\arctan a \tan (\arctan a)=a \therefore (b\times(((int)(`1`)) \oplus 48) + \tan(\sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{2n-1} \ a ^{2n-1}))\&9223372036854775807=a+b

听懂掌声

AC代码

// Problem: U432117 A ? B Problem
// Contest: Luogu
// URL: https://www.luogu.com.cn/problem/U432117
// Memory Limit: 512 MB
// Time Limit: 5000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a,b;
int main()
{
    cin>>a>>b;
    cout<<a+b;
    return 0;
}