Submission #45580662


Source Code Expand

#pragma GCC optimize("Ofast,unroll-loops,inline")
#pragma GCC target("avx2,bmi,bmi2")
#include<bits/stdc++.h>
#define ll int
#define ld long double
#define pb push_back
#define prec fixed<<setprecision
#define endl '\n'
#define all(x) x.begin(),x.end()
#define pll pair<ll,ll>
#define open(name) if(fopen(name".inp", "r")){freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout);}
using namespace std;
const int maxN=2e5+69;
const int mod=1e9+7;
ll n,k,a[maxN];
void Enter(){
    cin>>n>>k;
    cout<<(ll)(pow(n,k)+pow(k,n));
}
//amogus
signed main(){
    open("CONSTRUCT");
    cin.tie(nullptr);ios_base::sync_with_stdio(NULL);
    //ll t=1;cin>>t;while(t--)
    Enter();
}

Submission Info

Submission Time
Task A - Leyland Number
User desb01
Language C++ 20 (gcc 12.2)
Score 100
Code Size 713 Byte
Status AC
Exec Time 1 ms
Memory 3720 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:11:54: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 | #define open(name) if(fopen(name".inp", "r")){freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout);}
      |                                               ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:22:5: note: in expansion of macro ‘open’
   22 |     open("CONSTRUCT");
      |     ^~~~
Main.cpp:11:87: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 | #define open(name) if(fopen(name".inp", "r")){freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout);}
      |                                                                                ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:22:5: note: in expansion of macro ‘open’
   22 |     open("CONSTRUCT");
      |     ^~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 9
Set Name Test Cases
Sample sample00.txt, sample01.txt, sample02.txt
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt
Case Name Status Exec Time Memory
sample00.txt AC 1 ms 3640 KiB
sample01.txt AC 1 ms 3632 KiB
sample02.txt AC 1 ms 3656 KiB
testcase00.txt AC 1 ms 3720 KiB
testcase01.txt AC 1 ms 3644 KiB
testcase02.txt AC 1 ms 3700 KiB
testcase03.txt AC 1 ms 3616 KiB
testcase04.txt AC 1 ms 3580 KiB
testcase05.txt AC 1 ms 3712 KiB