DCP-443: Boltu vs Balti Back to All Problems

Beginner Beginners Problems > Ad-hoc


Boltu and Balti are two friends. Boltu is a great programmer whereas Balti is a newbie programmer. But Balti thinks that he is also a great programmer, but Boltu can’t accept Balti as a great programmer. Now Boltu challenges Balti to solve a task to prove himself as a great programmer. Balti accepts that challenge. The task is Boltu will give him a number N. Balti have to say if N-th Partial sum number and N-th factorial number are same or not. Balti knows the meaning of **N-th partial sum is summation from 1 to N (1+2+....+N)** and the meaning of **N-th factorial is multiplication of all numbers from 1 to N (1*2*....*N)**. Balti is getting stuck to find the solution. Now he wants your help. Help him to win this challenge by solving this problem. Input: ------ Input starts with an integer T (1 <= T <= 100) denoting the number of test cases. Each case contains an integer N (1 ≤ N ≤ 10000000). Output: ------- For each test case, print "`Case X-> Y;`". Where X denotes the number of test case. **If N-th Partial sum and N-th factorial number are same** then Y will "YES", if these are not same then Y will "NO", Sample Input ------------ 2 4 5 Sample Output ------------- Case 1-> NO; Case 2-> NO;


Problem Setter:

Farid

Please login to submit solution to this problem.

Problem Limits

Language Time Limit (seconds)
C 0.50
C++ 0.50
C++14 0.50
C# 1.00
Go 1.00
Java 1.00
JavaScript 1.00
Objective-C 1.00
Perl 1.00
PHP 1.00
Python 1.00
Python3 1.00
Ruby 1.00
VB.Net 1.00

Problem Stats

208/701

Solve/Submission

Ranking

# User Language Timing
01 CLown1331 Cpp14 0.00s
02 skmonir Cpp 0.00s
03 Islam_Rafat Cpp 0.00s
04 Arpan_cse_2k14 Cpp14 0.00s
05 Zihad Cpp 0.00s
06 pulak_ict_mbstu Cpp14 0.00s
07 Anubis Cpp 0.00s
08 Fahim_41 C 0.00s
09 ArifKhanShubro Cpp 0.00s
10 Gulam_Kibria Cpp 0.00s
11 introverted Cpp 0.00s
12 SakibAlamin Cpp 0.00s
13 Superstorm Cpp14 0.00s
14 The_Viper Cpp14 0.00s
15 Bruteforcekid Cpp14 0.00s
16 tvirussust Cpp 0.00s
17 int_elligent Cpp 0.00s
18 cse_nazmul Cpp 0.00s
19 _c_k_r_ Cpp 0.00s
20 Rijoanul_Shanto Cpp 0.00s
21 sk23 Cpp 0.00s
22 leonelshovo Cpp 0.00s
23 ssavi Cpp 0.00s
24 yeamin Cpp 0.00s
25 Rizon_sunny Cpp 0.00s
26 Reayz Cpp 0.00s
27 kissu_pari_na Cpp14 0.00s
28 desh_chowdhury C 0.00s
29 susmoys Cpp 0.00s
30 t0whid Cpp 0.00s
31 aaman007 Cpp 0.00s
32 Eucalyptus C 0.00s
33 shishir09 Cpp 0.00s
34 Shamim_A Cpp14 0.00s
35 Ziaul Cpp 0.00s
36 tanu_1603070 Cpp 0.00s
37 kamran_11b Cpp 0.00s
38 ehsan_sshuvo Cpp 0.00s
39 Shahriar_88 Cpp 0.00s
40 mhiceiuk Cpp 0.00s
41 belal_mbstu Cpp14 0.00s
42 Bisnu039 Cpp 0.00s
43 amani_LU Cpp 0.00s
44 Silent_Warrior Cpp 0.00s
45 Zayed Cpp 0.00s
46 aarifshuvo Cpp 0.00s
47 Rajan_sust Cpp14 0.00s
48 maxhasan Cpp 0.00s
49 Ataur Cpp 0.00s
50 Not_Found0001 Cpp 0.00s
Feedback

Your feedback is our precious!



Or call +88 02 9853138 for support