Submission #17480729


Source Code Expand

Copy
#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define debug(x) cout<<x<<"DE\n";
#define debug2(x,y) cout<<x<<" "<<y<<"DE\n";

int main()
{
    ll n,m=0,e=0,c=0;
    cin>>n;
    set<ll>s;
    for(ll i=1;i*i<=n;i++){
        if(n%i==0){
            s.insert(i);
            s.insert(n/i);
        }
    }
    for(auto it=s.begin();it!=s.end();it++){
        cout<<*it<<endl;
    }
}

Submission Info

Submission Time
Task C - Cream puff
User Hafiz_
Language C++ (GCC 9.2.1)
Score 300
Code Size 424 Byte
Status AC
Exec Time 28 ms
Memory 3780 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10:10: warning: unused variable ‘m’ [-Wunused-variable]
   10 |     ll n,m=0,e=0,c=0;
      |          ^
./Main.cpp:10:14: warning: unused variable ‘e’ [-Wunused-variable]
   10 |     ll n,m=0,e=0,c=0;
      |              ^
./Main.cpp:10:18: warning: unused variable ‘c’ [-Wunused-variable]
   10 |     ll n,m=0,e=0,c=0;
      |                  ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 26
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, hand_11.txt, hand_12.txt, hand_13.txt, hand_14.txt, hand_15.txt, hand_88.txt, hand_99.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 21 ms 3416 KB
hand_02.txt AC 18 ms 3588 KB
hand_03.txt AC 19 ms 3664 KB
hand_04.txt AC 18 ms 3432 KB
hand_05.txt AC 15 ms 3476 KB
hand_06.txt AC 16 ms 3484 KB
hand_07.txt AC 16 ms 3620 KB
hand_08.txt AC 15 ms 3588 KB
hand_09.txt AC 22 ms 3432 KB
hand_10.txt AC 28 ms 3780 KB
hand_11.txt AC 25 ms 3744 KB
hand_12.txt AC 19 ms 3684 KB
hand_13.txt AC 21 ms 3712 KB
hand_14.txt AC 13 ms 3496 KB
hand_15.txt AC 14 ms 3424 KB
hand_88.txt AC 14 ms 3492 KB
hand_99.txt AC 2 ms 3544 KB
random_01.txt AC 7 ms 3488 KB
random_02.txt AC 2 ms 3488 KB
random_03.txt AC 16 ms 3484 KB
random_04.txt AC 2 ms 3544 KB
random_05.txt AC 13 ms 3616 KB
random_06.txt AC 2 ms 3544 KB
sample_01.txt AC 2 ms 3416 KB
sample_02.txt AC 2 ms 3592 KB
sample_03.txt AC 3 ms 3476 KB