Submission #61791134


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n';
typedef long long ll;
typedef pair<int, int> pii;
signed main()
{
// freopen("addin.txt", "r", stdin);
// freopen("addout.txt", "w", stdout);
cin.sync_with_stdio(false);
cin.tie(0);
int ans = 1;
int n ;
int cur = 1;
cin >> n;
while(cur<n){
cur *= ans;
ans ++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n';
typedef long long ll;
typedef pair<int, int> pii;

signed main()
{
    // freopen("addin.txt", "r", stdin);
    // freopen("addout.txt", "w", stdout);

    cin.sync_with_stdio(false);
    cin.tie(0);
    int ans = 1;
    int n ;
    int cur = 1;
    cin >> n;
    while(cur<n){
        cur *= ans;
        ans ++;
    }
    cout << ans-1;
}

Submission Info

Submission Time
Task B - tcaF
User RainFox
Language C++ 20 (gcc 12.2)
Score 150
Code Size 450 Byte
Status AC
Exec Time 1 ms
Memory 3620 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 2
AC × 21
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 3556 KB
00_sample_01.txt AC 1 ms 3396 KB
01_test_00.txt AC 1 ms 3392 KB
01_test_01.txt AC 1 ms 3476 KB
01_test_02.txt AC 1 ms 3424 KB
01_test_03.txt AC 1 ms 3556 KB
01_test_04.txt AC 1 ms 3492 KB
01_test_05.txt AC 1 ms 3616 KB
01_test_06.txt AC 1 ms 3420 KB
01_test_07.txt AC 1 ms 3420 KB
01_test_08.txt AC 1 ms 3396 KB
01_test_09.txt AC 1 ms 3620 KB
01_test_10.txt AC 1 ms 3400 KB
01_test_11.txt AC 1 ms 3396 KB
01_test_12.txt AC 1 ms 3492 KB
01_test_13.txt AC 1 ms 3396 KB
01_test_14.txt AC 1 ms 3556 KB
01_test_15.txt AC 1 ms 3488 KB
01_test_16.txt AC 1 ms 3488 KB
01_test_17.txt AC 1 ms 3364 KB
01_test_18.txt AC 1 ms 3432 KB


2025-03-05 (Wed)
18:06:08 +00:00