Submission #61833858
Source Code Expand
Copy
#include<bits/stdc++.h>#define inf long long#define pii pair<int,int>#define p1 first#define p2 secondusing namespace std;const int maxn=1e5+5;double logSum;inf n=1,x;int main(){//freopen("c.in","r",stdin);//freopen("c.out","w",stdout);cin>>x;while(true){logSum+=log(n);if (fabs(logSum-log(x))<1e-9)break;++n;}cout<<n;
#include<bits/stdc++.h> #define inf long long #define pii pair<int,int> #define p1 first #define p2 second using namespace std; const int maxn=1e5+5; double logSum; inf n=1,x; int main() { //freopen("c.in","r",stdin); //freopen("c.out","w",stdout); cin>>x; while(true) { logSum+=log(n); if (fabs(logSum-log(x))<1e-9)break; ++n; } cout<<n; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - tcaF |
User | sjc2 |
Language | C++ 20 (gcc 12.2) |
Score | 150 |
Code Size | 409 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3800 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 150 / 150 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 01_test_00.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3648 KB |
00_sample_01.txt | AC | 1 ms | 3664 KB |
01_test_00.txt | AC | 1 ms | 3720 KB |
01_test_01.txt | AC | 1 ms | 3720 KB |
01_test_02.txt | AC | 1 ms | 3800 KB |
01_test_03.txt | AC | 1 ms | 3800 KB |
01_test_04.txt | AC | 1 ms | 3728 KB |
01_test_05.txt | AC | 1 ms | 3716 KB |
01_test_06.txt | AC | 1 ms | 3704 KB |
01_test_07.txt | AC | 1 ms | 3708 KB |
01_test_08.txt | AC | 1 ms | 3608 KB |
01_test_09.txt | AC | 1 ms | 3732 KB |
01_test_10.txt | AC | 1 ms | 3732 KB |
01_test_11.txt | AC | 1 ms | 3780 KB |
01_test_12.txt | AC | 1 ms | 3648 KB |
01_test_13.txt | AC | 1 ms | 3792 KB |
01_test_14.txt | AC | 1 ms | 3640 KB |
01_test_15.txt | AC | 1 ms | 3716 KB |
01_test_16.txt | AC | 1 ms | 3644 KB |
01_test_17.txt | AC | 1 ms | 3780 KB |
01_test_18.txt | AC | 1 ms | 3728 KB |