Language: C++


///AJoy Sarker ,CSE JAHANGIRNAGAR UNIVERSITY 48 Batch
#include<bits/stdc++.h>
using namespace std;
#define SORT(c) sort((c).begin(),(c).end());
#define inf INT_MAX/3
#define pb push_back
#define MP make_pair
#define pii pair<int,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define pi 3.141592653589793
#define in scanf
#define out printf
#define ll long long
#define ull unsigned long long
#define w(x) int x;cin>>x;while(x--)
#define fast ios_base::sync_with_stdio(0)
typedef unsigned long long UL;
template<typename T>inline T  S(T a)
{
    return a*a;
}
template<class T>inline string tostring(T a)
{
    ostringstream os("");
    os << a;
    return os.str();
}
template<typename T>inline ll tolong(T a)
{
    ll res;
    istringstream os(a);
    os>>res;
    return res;
}
template<typename T>inline T gcd(T a, T b)
{
    if (b == 0)return a;
    else return gcd(b, a % b);
}
template<typename T>inline T bigmod(T a, T b, T m)
{
    if (b == 0)return 1;
    else if (b % 2 == 0)return S(bigmod(a, b / 2, m)) % m;
    else return (a % m*bigmod(a, b - 1, m)) % m;
}

char a[59];

map<pair<int,int>,int> mp;
int vis[159];
int main()
{
    fast;
    string s;
    cin>>s;
    bool ok=0;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='7') ok=1;
    }
    cout<<(ok?"Yes\n":"No\n");
    return 0;

}

///AJoy Sarker ,CSE JAHANGIRNAGAR UNIVERSITY 48 Batch
#include<bits/stdc++.h>
using namespace std;
#define SORT(c) sort((c).begin(),(c).end());
#define inf INT_MAX/3
#define pb push_back
#define MP make_pair
#define pii pair<int,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define pi 3.141592653589793
#define in scanf
#define out printf
#define ll long long
#define ull unsigned long long
#define w(x) int x;cin>>x;while(x--)
#define fast ios_base::sync_with_stdio(0)
typedef unsigned long long UL;
template<typename T>inline T  S(T a)
{
    return a*a;
}
template<class T>inline string tostring(T a)
{
    ostringstream os("");
    os << a;
    return os.str();
}
template<typename T>inline ll tolong(T a)
{
    ll res;
    istringstream os(a);
    os>>res;
    return res;
}
template<typename T>inline T gcd(T a, T b)
{
    if (b == 0)return a;
    else return gcd(b, a % b);
}
template<typename T>inline T bigmod(T a, T b, T m)
{
    if (b == 0)return 1;
    else if (b % 2 == 0)return S(bigmod(a, b / 2, m)) % m;
    else return (a % m*bigmod(a, b - 1, m)) % m;
}

char a[59];

map<pair<int,int>,int> mp;
int vis[159];
int main()
{
    fast;
    ll n,sum=0;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        if(i%3==0||i%5==0||(i%5==0&&i%3==0)) continue;
        else
            sum+=i;
    }
   cout<<sum<<endl;
}




Compiler output:
a.cc:96:31: error: redefinition of 'template<class T> T S(T)'
   96 | template<typename T>inline T  S(T a)
      |                               ^
a.cc:25:31: note: 'template<class T> T S(T)' previously declared here
   25 | template<typename T>inline T  S(T a)
      |                               ^
a.cc:100:32: error: redefinition of 'template<class T> std::string tostring(T)'
  100 | template<class T>inline string tostring(T a)
      |                                ^~~~~~~~
a.cc:29:32: note: 'template<class T> std::string tostring(T)' previously declared here
   29 | template<class T>inline string tostring(T a)
      |                                ^~~~~~~~
a.cc:106:31: error: redefinition of 'template<class T> long long int tolong(T)'
  106 | template<typename T>inline ll tolong(T a)
      |                               ^~~~~~
a.cc:35:31: note: 'template<class T> long long int tolong(T)' previously declared here
   35 | template<typename T>inline ll tolong(T a)
      |                               ^~~~~~
a.cc:113:30: error: redefinition of 'template<class T> T gcd(T, T)'
  113 | template<typename T>inline T gcd(T a, T b)
      |                              ^~~
a.cc:42:30: note: 'template<class T> T gcd(T, T)' previously declared here
   42 | template<typename T>inline T gcd(T a, T b)
      |                              ^~~
a.cc:118:30: error: redefinition of 'template<class T> T bigmod(T, T, T)'
  118 | template<typename T>inline T bigmod(T a, T b, T m)
      |                              ^~~~~~
a.cc:47:30: note: 'template<class T> T bigmod(T, T, T)' previously declared here
   47 | template<typename T>inline T bigmod(T a, T b, T m)
      |                              ^~~~~~
a.cc:125:6: error: redefinition of 'char a [59]'
  125 | char a[59];
      |      ^
a.cc:54:6: note: 'char a [59]' previously declared here
   54 | char a[59];
      |      ^
a.cc:127:24: error: redefinition of 'std::map<std::pair<int, int>, int> mp'
  127 | map<pair<int,int>,int> mp;
      |                        ^~
a.cc:56:24: note: 'std::map<std::pair<int, int>, int> mp' previously declared here
   56 | map<pair<int,int>,int> mp;
      |                        ^~
a.cc:128:5: error: redefinition of 'int vis [159]'
  128 | int vis[159];
      |     ^~~
a.cc:57:5: note: 'int vis [159]' previously declared here
   57 | int vis[159];
      |     ^~~
a.cc:129:5: error: redefinition of 'int main()'
  129 | int main()
      |     ^~~~
a.cc:58:5: note: 'int main()' previously defined here
   58 | int main()
      |     ^~~~