Submission #17578344


Source Code Expand

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


typedef long long ll; 
vector<int> Vec;
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);

	ll N; cin>>N;
	for(int i = 1; i * i <= N; i++){
		if ( N % i == 0){
			int j = N / i;
			Vec.push_back(i);
			Vec.push_back(j);
		}
	}
	sort(Vec.begin(), Vec.end());
	for(int j = 0; j < Vec.size(); j++) 
        cout << Vec.at(j) <<"\n";
	return 0;
}

Submission Info

Submission Time
Task C - Cream puff
User adewuyiisrael
Language C++ (GCC 9.2.1)
Score 0
Code Size 413 Byte
Status WA
Exec Time 2205 ms
Memory 3596 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:20:19: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   20 |  for(int j = 0; j < Vec.size(); j++)
      |                 ~~^~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
AC × 6
WA × 1
TLE × 19
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 TLE 2205 ms 3256 KB
hand_02.txt TLE 2205 ms 3212 KB
hand_03.txt TLE 2205 ms 3404 KB
hand_04.txt TLE 2205 ms 3192 KB
hand_05.txt TLE 2205 ms 3216 KB
hand_06.txt TLE 2205 ms 3240 KB
hand_07.txt TLE 2205 ms 3304 KB
hand_08.txt TLE 2205 ms 3356 KB
hand_09.txt TLE 2205 ms 3288 KB
hand_10.txt TLE 2205 ms 3320 KB
hand_11.txt TLE 2205 ms 3320 KB
hand_12.txt TLE 2205 ms 3240 KB
hand_13.txt TLE 2205 ms 3336 KB
hand_14.txt TLE 2205 ms 3208 KB
hand_15.txt TLE 2205 ms 3344 KB
hand_88.txt TLE 2205 ms 3264 KB
hand_99.txt WA 7 ms 3520 KB
random_01.txt TLE 2205 ms 3148 KB
random_02.txt AC 9 ms 3432 KB
random_03.txt TLE 2205 ms 3344 KB
random_04.txt AC 9 ms 3424 KB
random_05.txt TLE 2205 ms 3256 KB
random_06.txt AC 5 ms 3488 KB
sample_01.txt AC 4 ms 3436 KB
sample_02.txt AC 2 ms 3596 KB
sample_03.txt AC 3 ms 3504 KB