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:


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




# User Language Timing
01 ssavi Cpp 0.00s
02 badhansen123 Cpp 0.00s
03 CLown1331 Cpp14 0.00s
04 skmonir Cpp 0.00s
05 Zayed Cpp 0.00s
06 cse_nazmul Cpp 0.00s
07 demon Cpp 0.00s
08 ArifKhanShubro Cpp 0.00s
09 Titanium_Owner Cpp 0.00s
10 Nazmul_WUB Cpp 0.00s
11 rabel Cpp 0.00s
12 mhiceiuk Cpp 0.00s
13 Rijoanul_Shanto Cpp 0.00s
14 ehsan_sshuvo Cpp 0.00s
15 Rizon_sunny Cpp 0.00s
16 tariqiitju Cpp 0.00s
17 Superstorm Cpp14 0.00s
18 Nur_Alam39 Cpp 0.00s
19 t0whid Cpp 0.00s
20 Pure_Protea Cpp14 0.00s
21 maxhasan Cpp 0.00s
22 Arpan_cse_2k14 Cpp14 0.00s
23 shishir09 Cpp 0.00s
24 The_Viper Cpp14 0.00s
25 Shamim_A Cpp14 0.00s
26 maf_uu Cpp 0.00s
27 wizard Cpp 0.00s
28 rafsanulhasan Cpp 0.00s
29 aarifshuvo Cpp 0.00s
30 SIU_LasToNe Cpp 0.00s
31 sohag_AUST Cpp 0.00s
32 afzalul C 0.00s
33 abufarhad Cpp 0.00s
34 motaleb_ICT Cpp 0.00s
35 Reayz Cpp 0.00s
36 sk_roy Cpp 0.00s
37 belal_mbstu Cpp14 0.00s
38 Anubis Cpp 0.00s
39 Code_Hunter Cpp 0.00s
40 Islam_Rafat Cpp 0.00s
41 yeamin Cpp 0.00s
42 pulak_ict_mbstu Cpp14 0.00s
43 feodorv C 0.00s
44 hamza133913 Cpp 0.00s
45 Chayti_Saha98 Cpp14 0.00s
46 Ansarul_14 Cpp 0.00s
47 Silent_Warrior Cpp 0.00s
48 neel71 C 0.00s
49 nymphaea Cpp 0.00s
50 jualahmed Cpp14 0.00s

Your feedback is our precious!

Or call +88 02 9853138 for support