Submission #61788259
Source Code Expand
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/*
Author : Sunny Kumar
Descr : Always Ignore
*/
#include <bits/stdc++.h>
#pragma GCC optimize("02")
using namespace std;
#define fastio() \
std::ios_base::sync_with_stdio(false); \
std::cin.tie(0); \
std::cout.tie(0)
#define nline \
std::cout << "\n"
#define YES \
std::cout << "YES"
#define NO \
std::cout << "NO"
#define input \
std::cin >>
#define output \
std::cout <<
#define _print(vec) \
for (auto &ii : vec) \
cout << ii << " ";
// --------------------------------------------------------------
#define MOD 1000000007
#define MOD1 998244353
#define INF 1e18
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define ff first
#define ss second
#define PI 3.141592653589793238462
#define set_bits __builtin_popcountll
#define sz(x) ((int)(x).size())
#define max(a, b) (a < b ? b : a)
#define min(a, b) ((a > b) ? b : a)
#define FOR(a, c) for (int a = 0; a < c; a++)
#define FORL(a, b, c) for (int a = b; a <= c; a++)
#define FORR(a, b, c) for (int a = b; a >= c; a--)
#define allass(x) sort(x.begin(), x.end());
#define alldsc(x) sort(x.rbegin(), x.rend());
#define revass(x) reverse(x.begin(), x.end());
#define revdsc(x) reverse(x.rbegin(), x.rend());
#define sum_int(x) accumulate(x.begin(), x.end(), 0)
#define sum_long_long(x) accumulate(x.begin(), x.end(), 0ll)
#define lower__bound(x, val) lower_bound(x.begin(), x.end(), val) - x.begin()
#define upper__bound(x, val) upper_bound(x.begin(), x.end(), val) - x.begin()
#define sqr_veci(x) for_each(x.begin(), x.end(), [](int &n)({ n *= n; }))
#define sqr_vecl(x) for_each(x.begin(), x.end(), [](long long &n)({ n *= n; }))
// --------------------------------------------------------------
typedef unsigned int utt;
typedef unsigned long long ull;
typedef long long ll;
typedef float flt;
typedef long long int lli;
typedef double dd;
typedef long double lld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
typedef vector<pl> vpl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
// --------------------------------------------------------------
int start_time; // Time Variable
void Start_Time()
{
start_time = clock();
}
#ifndef EXPERT_JUDGE
#define debug(sunny) \
cerr << "[" << #sunny << "] = " << " "; \
_display_output(sunny); \
cerr << endl;
#else
#define debug(sunny)
#endif
// --------------------------------------------------------------
void _display_output(int t) { cerr << t; }
void _display_output(long t) { cerr << t; }
void _display_output(ll t) { cerr << t; }
void _display_output(ull t) { cerr << t; }
void _display_output(utt t) { cerr << t; }
void _display_output(lld t) { cerr << t; }
void _display_output(bool t) { cerr << (t ? "true" : "false"); }
void _display_output(flt t) { cerr << t; }
void _display_output(double t) { cerr << t; }
void _display_output(char t) { cerr << t; }
void _display_output(string t) { cerr << t; }
//--------------------------------------------------------------
void End_Time()
{
int Time_Taken = double(clock() - start_time) / CLOCKS_PER_SEC;
// cerr << " : [";
debug(Time_Taken);
// cerr << "s]";
}
#define power_value(a, b, val) \
ll res = 1; \
while (b--) \
{ \
res *= a; \
} \
val = res;
#define square_root(a, val) \
ll root = 1; \
while ((root * root) <= a) \
{ \
root++; \
} \
val = root - 1;
#define log_base(bs, exp, val) \
int cnt = 0; \
while (exp) \
{ \
exp /= bs; \
cnt++; \
} \
val = cnt - 1;
//--------------------------------------------------------------
template <typename T, typename V>
void _display_output(pair<T, V> p)
{
cerr << "{";
_display_output(p.ff);
cerr << ",";
_display_output(p.ss);
cerr << "}";
}
template <typename T>
void _display_output(vector<T> vec)
{
cerr << "[ ";
for (T i : vec)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T, typename V>
void _display_output(vector<pair<T, V>> vec_pair)
{
cerr << "[ ";
for (auto i : vec_pair)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T>
void _display_output(set<T> ordered_set)
{
cerr << "[ ";
for (T i : ordered_set)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T>
void _display_output(unordered_set<T> hash)
{
cerr << "[ ";
for (T i : hash)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T>
void _display_output(multiset<T> v)
{
cerr << "[ ";
for (T i : v)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T, typename V>
void _display_output(map<T, V> v)
{
cerr << "[ ";
for (auto i : v)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T, typename V>
void _display_output(multimap<T, V> v)
{
cerr << "[ ";
for (auto i : v)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T, typename V>
void _display_output(unordered_map<T, V> hash)
{
cerr << "[ ";
for (auto i : hash)
{
_display_output(i);
cerr << " ";
}
cerr << "]";
}
template <typename T>
void _display_output(priority_queue<T> heap)
{
vector<T> heap_vector;
while (!heap.empty())
{
heap_vector.pb(heap.top());
heap.pop();
}
debug(heap_vector);
}
template <typename T>
void _display_output(priority_queue<T, vector<T>, greater<T>> heap)
{
vector<T> heap_vector;
while (!heap.empty())
{
heap_vector.pb(heap.top());
heap.pop();
}
debug(heap_vector);
}
template <typename T, typename V>
void _display_output(priority_queue<pair<T, V>> heap)
{
vector<pair<T, V>> heap_vector;
while (!heap.empty())
{
heap_vector.pb({heap.top().ff, heap.top().ss});
heap.pop();
}
debug(heap_vector);
}
template <typename T, typename V>
void _display_output(priority_queue<pair<T, V>, vector<pair<T, V>>, greater<pair<T, V>>> heap)
{
vector<pair<T, V>> heap_vector;
while (!heap.empty())
{
heap_vector.pb({heap.top().ff, heap.top().ss});
heap.pop();
}
debug(heap_vector);
}
template <typename T>
void _display_output(queue<T> que)
{
cerr << "[ ";
while (!que.empty())
{
_display_output(que.front());
que.pop();
cerr << " ";
}
cerr << "]";
}
template <typename T>
void _display_output(stack<T> stck)
{
cerr << "[ ";
while (!stck.empty())
{
_display_output(stck.top());
stck.pop();
cerr << " ";
}
cerr << "]";
}
// --------------------------------------------------------------
// Code Start Here
void Sanhayu546__()
{
int test;
// input test;
test = 1;
while (test--)
{
ll X;
input X;
int cnt = 1;
ll prod = 1;
while (cnt <= 200)
{
if (prod == X)
{
output cnt - 1;
break;
}
prod *= cnt;
cnt++;
}
}
return;
}
int main()
{
#ifndef EXPERT_JUDGE
freopen("Output.txt", "w", stderr);
#endif
fastio();
Start_Time();
Sanhayu546__();
End_Time();
}
Submission Info
Submission Time |
|
Task |
B - tcaF |
User |
sanhayu546 |
Language |
C++ 20 (gcc 12.2) |
Score |
150 |
Code Size |
8203 Byte |
Status |
AC |
Exec Time |
1 ms |
Memory |
3724 KB |
Compile Error
Main.cpp: In function ‘int main()’:
Main.cpp:347:12: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
347 | freopen("Output.txt", "w", stderr);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
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 |
3604 KB |
01_test_00.txt |
AC |
1 ms |
3596 KB |
01_test_01.txt |
AC |
1 ms |
3608 KB |
01_test_02.txt |
AC |
1 ms |
3516 KB |
01_test_03.txt |
AC |
1 ms |
3528 KB |
01_test_04.txt |
AC |
1 ms |
3724 KB |
01_test_05.txt |
AC |
1 ms |
3640 KB |
01_test_06.txt |
AC |
1 ms |
3724 KB |
01_test_07.txt |
AC |
1 ms |
3600 KB |
01_test_08.txt |
AC |
1 ms |
3524 KB |
01_test_09.txt |
AC |
1 ms |
3592 KB |
01_test_10.txt |
AC |
1 ms |
3524 KB |
01_test_11.txt |
AC |
1 ms |
3608 KB |
01_test_12.txt |
AC |
1 ms |
3568 KB |
01_test_13.txt |
AC |
1 ms |
3572 KB |
01_test_14.txt |
AC |
1 ms |
3568 KB |
01_test_15.txt |
AC |
1 ms |
3596 KB |
01_test_16.txt |
AC |
1 ms |
3596 KB |
01_test_17.txt |
AC |
1 ms |
3536 KB |
01_test_18.txt |
AC |
1 ms |
3524 KB |