Submission #61787584


Source Code Expand

Copy
#include<cstdio>
long long n;
int main(){
scanf("%lld",&n);
long long ans=1;
for(int i=1;;i++){
ans*=i;
if(ans==n){
printf("%d",i);
return 0;
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<cstdio>
long long n;
int main(){
    scanf("%lld",&n);
    long long ans=1;
    for(int i=1;;i++){
        ans*=i;
        if(ans==n){
            printf("%d",i);
            return 0;
        }
    }
}

Submission Info

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

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 |     scanf("%lld",&n);
      |     ~~~~~^~~~~~~~~~~

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 1632 KB
00_sample_01.txt AC 1 ms 1728 KB
01_test_00.txt AC 1 ms 1568 KB
01_test_01.txt AC 1 ms 1628 KB
01_test_02.txt AC 1 ms 1656 KB
01_test_03.txt AC 1 ms 1628 KB
01_test_04.txt AC 1 ms 1612 KB
01_test_05.txt AC 0 ms 1724 KB
01_test_06.txt AC 1 ms 1632 KB
01_test_07.txt AC 1 ms 1564 KB
01_test_08.txt AC 1 ms 1564 KB
01_test_09.txt AC 0 ms 1584 KB
01_test_10.txt AC 1 ms 1652 KB
01_test_11.txt AC 1 ms 1620 KB
01_test_12.txt AC 1 ms 1644 KB
01_test_13.txt AC 0 ms 1616 KB
01_test_14.txt AC 1 ms 1616 KB
01_test_15.txt AC 0 ms 1728 KB
01_test_16.txt AC 1 ms 1584 KB
01_test_17.txt AC 1 ms 1728 KB
01_test_18.txt AC 1 ms 1560 KB


2025-02-27 (Thu)
22:45:50 +00:00