Submission #15584843
Source Code Expand
#include <bits/stdc++.h>
#define rep(i,l,r) for(int (i)=(l);(i)<(r);(i)++)
#define ll long long
using namespace std;
void deb(){
cout<<"a";
exit(0);
}
ll fp(ll a){return a*a*a*a*a;}
int main(){
ll x;
cin>>x;
rep(a,-120,121){
rep(b,-120,121){
if(fp(a)-fp(b)==x){
cout<<a<<" "<<b<<endl;
return 0;
}
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - I hate Factorization |
| User | komugi |
| Language | C++ (GCC 9.2.1) |
| Score | 400 |
| Code Size | 418 Byte |
| Status | AC |
| Exec Time | 8 ms |
| Memory | 3552 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:2:28: warning: unnecessary parentheses in declaration of ‘a’ [-Wparentheses]
2 | #define rep(i,l,r) for(int (i)=(l);(i)<(r);(i)++)
| ^
./Main.cpp:13:5: note: in expansion of macro ‘rep’
13 | rep(a,-120,121){
| ^~~
./Main.cpp:2:28: warning: unnecessary parentheses in declaration of ‘b’ [-Wparentheses]
2 | #define rep(i,l,r) for(int (i)=(l);(i)<(r);(i)++)
| ^
./Main.cpp:14:9: note: in expansion of macro ‘rep’
14 | rep(b,-120,121){
| ^~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 400 / 400 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | Sample_01.txt, Sample_02.txt |
| All | Sample_01.txt, Sample_02.txt, bmin_01.txt, rand_01.txt, rand_02.txt, rand_03.txt, rand_04.txt, rand_05.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt, small_05.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| Sample_01.txt | AC | 8 ms | 3516 KiB |
| Sample_02.txt | AC | 2 ms | 3336 KiB |
| bmin_01.txt | AC | 2 ms | 3396 KiB |
| rand_01.txt | AC | 2 ms | 3372 KiB |
| rand_02.txt | AC | 2 ms | 3456 KiB |
| rand_03.txt | AC | 2 ms | 3484 KiB |
| rand_04.txt | AC | 2 ms | 3512 KiB |
| rand_05.txt | AC | 4 ms | 3524 KiB |
| small_01.txt | AC | 2 ms | 3512 KiB |
| small_02.txt | AC | 2 ms | 3484 KiB |
| small_03.txt | AC | 2 ms | 3552 KiB |
| small_04.txt | AC | 2 ms | 3520 KiB |
| small_05.txt | AC | 2 ms | 3336 KiB |