Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7091 - Шоо |
k ширхэг шоог орхиход /хаяхад/ буух ялгаатай буултын тоог ол. Шоо нь 1, 2, 3, 4, 5, 6 гэсэн тоонуудын аль нэгээр бууна.
Input
Шооны тоо n өгөгдөнө. n<=50.
Output
Ялгаатай буултын тоо.
Example
Input: 6 Output: 462
Нэмсэн: | Bataa |
Огноо: | 2013-02-06 |
Хугацааны хязгаарлалт: | 1s |
Эх кодын хэмжээний хязгаарлалт: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Програмчлалын хэлүүд: | ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE |
hide comments
|
||||||
2024-12-12 16:49:59
#include <iostream> using namespace std; // Function to calculate factorial long long factorial(int num) { long long result = 1; for (int i = 1; i <= num; ++i) { result *= i; } return result; } // Function to calculate combinations with repetition long long combinations(int n, int r) { return factorial(n + r - 1) / (factorial(r) * factorial(n - 1)); } int main() { int n; cin >> n; // Number of dice // Calculate the number of distinct outcomes long long result = combinations(6, n); cout << result << endl; return 0; } |
||||||
2024-12-05 02:03:30
::..:::::::::::::::::::::::::::::::::::--------=++++**##**###%%%%#####*=-::::::::::::........:------------------:::...:::::::::::: ::::::::::::::::::::::::::::::::...::----------+*##%%###################*+=-::--------------------------::-----------::::::::::::: :::::::::::::::::::::::::::::::::.::::::------=++**#%%%%%%%%######%####**##*=---------------------------:::---------:::::::::::::: ..::.........:::........::::::::::::::::-----=+**###%%%%%%%%%%##%%%%#%#*##***+--------------------------------------:::::::::::... .................. .........:::::::::::----=++*###%%%%%%%%%%%%%%%###%######***-:-:::::::::---------------------:::::.. ........ ................... ..........::::::::.::---=+***#############################*-:::..:::::.:--------------::...................... ................... .......:...::::::..:::====+*+++++++++++++========++**##%##*-....:.....:---------------:............... .. .. ...............................:::::::.::-+##*+=++++++==================+*####*::.....::::-----------------::..................... ........:......:::::::::::::::::::::::::-=*##*==++++++++=================+*###*:....:::::::------------------:............... ... . ....::::::....:::::::::::::::::::::::--+#**+==++++++++=================+*###*--------------:::---------------::::............... ....::::::... .::::::::::::::::::::::--=***+==+****+++==========--=====+*###+------------:::.:----------------------:.......... ..:::::::::....::::::::::.........:::::--=*++-+*********+==++++++=======+*#**=------------:::.:----------::-----------:::........ ...:::::::..:::::::.. ...........::::--:+==+***********+==++***+++++===*#*=::::----------::::----------:::::--------:::::...... ........:::.::::::::. . .. .....:--:---+++++++++***+====+*#**++====**-.:...:..::-------::----------::::::-------------::::: ..................... .............:**+----=++++++++**++==============+*+:..........:------------------:...:::------------::::: ............... . ....:+**=:-=++++++++++++===============++=+::...:....:------------------:......::-----------:::: ............... .............:=+*+:-=++++++++****+++=============+=+:....:....:..::--------------:....:.::--------::::::: .............. . . .....::+*::=+++++++*****+++=============+=-:::..::..::::::::------------::.....:------:::...:::: ................ . ...............::=+::=++++++++++===--==============:...........:.....:------------:.....:---::::::..:::::: ................ ..........:....:=++++******+++===============::.::........:...:--------------:...:-----:::::::.....:- .............. .. ... .:.....=+++++******+++++++======-......::...::...::.::---------------::--------::.::...:...: .............. ..............:::...:-=++++++++*+++===========:.::.............::...:------------------:::-----:::......:: ............... ..........:....::--++++++++=============-::::...::...:::::::::::::---------------:::::-----::.......: ............::....... . ..........:::-----=+=++++*+++============-..::...::...:....::...:::---------------:.:..:----:::.....:: ..........:.::::::::. . .. ...::--------++**********++++++=====-=-::::::::::::...::::::---------------:...::..:::::::::::::: ....:....:...:::::::. . .....:::--------:+++++********++========:=#*=:...:....:...:-------------------::..........::::::::::: .....::::... .::::::::... .....:-:::--------=++++++++++===========::+####+-::....:...:--------:----------:::::::.....:::::::::.. :::::::::.. ..::::::::::.....:-----------===+++++*++++++========::-########+==--::::-------:::----------::..........:::::...... ::::::::::. ...:::::::::::::----------:::-*+=++++++++++++====++-:::+######%%%*++****+==----::::----------:::::::.....::::.... .. ::::::::::...::::::::::::::::------:::::.:--***++++++++++++++++=:::::*######%%%%######*********++==---------:..:::.....:::........ :::::::::::::::::::::...:::::--------==-.:--****+++++++++++*+=-::::::*#####%%%%%%%%%%##############***+===-::::::.....:-::........ ::::::::::::::::::... ...::::--==++*+==:::::-+++=====+*****=-:::::::+#####%%%%%%%%%%%%%%%%%%%%%%%%%%##%####*=:::::::..:-::........ :::::::::::::::::......::--==+*#####+==:::::========-+**+=-::::::::+####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###+::::...:---:........ ::::::::::::::::...::--==+**##%##%%#++-:---:=+++++++++=--::::::::=*###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#####+::::::---::........ ::::::::::::....:--==++*##%%%%#%%%%#++:-----=++++++++:-:::::::::+###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%######-::::::--:......... :::::::::::..:-==++**##%%%%%##%%%%%*+*:---=:=+++++++=---:::::::+##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###=:::::---:...:...:: :::::::-:::..=***###%%%%%%%#%%%%%%%###+*###-+*+++++++-**#**+==+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##+:::------::::...:- :::::::----::+#%%%%%%#%#%%%%%%%%%%%%##%%#++-+**++++++-===--==+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##-::-----:::.::--- :::::::------+#%%%%%%%%%%%%%%%%%%%%%%%%%##*=+****++++-#########%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#=:::------:::--- :::::::::----+#%%%%%%%%%%%%%%%%%%%%%%%%%#*++*******++-=======*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##-:::----------- :::::::::----#%%%%%%%%%%%%%%%%%%%%%%%%%%**+=+++++==-=**###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#-:::::--------- :::::::::::--#%%%%%%%%%%%%%%%%%%%%%%%%%%######+***#**++++===#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*-:::::--------- :::::::--::--#%%%%%%%%%%%%%%%%%%%%%%%%%%*++++=-=--=+****###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*-::::::------ :::::--------#%%%%%%%%%%%%%%%%%%%%%%%%%%######====+***+++++*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@%%%%%%%%#-::::::----- :::::--------*%%%%%%%%%%%%%%%%%%%%%%%%%%+=====----=*+****##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@%%@@@%%%%%%%%%*-:::::----- ::::--------:*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*----+*****++*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@%%@@%%%%%%%%%%%*=--:::---- ::::-------:-#%%%%%%%%%%%%%%%%%%%%%%%%%%+====-----++++****%%%%%%%%%%%%%%%%%%%%%%%%@%%%%%%%%%%%%%%%@@@@@@@@@@%%%%%%%%%%%%%##*+-::-- :::::------:-#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*----*#*****#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@%%%%%%%%%%%%%%%%%%#+-:: :::::------:-#%%%%%%%%%%%%%%%%%%%%%%%%%%+=====-=--*+++***%%%%%%%%%%%%%%%%%%%%%%%%%@%%%%%%%%%%%%%%%@@@@@@@@@%%@@%%%%%%%%%%%%%%%%#+- ::::::-----:-#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#+#==#####*#%%%%%%%%%+=+==-=======++++#%%%%%%%%%%%%%%@@@@@@@@@%%@@@@@%%%%%%%%%%%%%%%% ::::::------:#%%%%%%%%%%%%%%%%%%%%%%%%%%+======*++++++**%%%%%%%%%%#*+++++++++++++++++#%%%%%%%%%%%%@@@@@@@@@%@@@@@@%%%%%%%%%%%%%%%% ::::::-------*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%**=#######%%%%%%%%%%*+*****+++++++++++++*%%%%%%%%%%%@@@@@@@@%@@@@@@%%%%%%%%%%%%%%%%% ::::::--::---+%%%%%%%@%%%%%%%%%%%%%%%%%#+======*=++++**#%%%%%%%%%%**#**+++++++++++++=+++#%%%%%%%%%%@@@@@@@%@@@@@%%%%%%%%%%%%%%%%%% ::::::--::::-=#%%%%%%@@%%%%%%%%%%%%%%%%%%%%%%%**=######%%%%%%%%%%%%%#***++++++++++++====+*#%%%%%%%%%@@@@%%%%%%@@@@@%%%%%%%%%%%%%%% :::::::::::::-*%%%%%%@@%%%%%%%%%%%%%%%%%*+=====*=+++++*%%%%%%%%%%%%%%#***+++++++++++=====+*%%%%%%%%%%%%%%%%%%%%%%%@%%%%%%%%%%%%%%% :::::::::...:-+%%%%%%@@@%%%%%%%%%%%%%%%%%%%%%%**+%%%%%%%%%%%%%%%%%%%%%**#****+++++++======+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :::::::-:...:-=%%%%%%@@@%%%%%%%%%%%%%%%#**=====*++++**#%%%%%%%%%%%%%%%%#**++++++++++======+#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% :::::::-:...--=%%%%%%@@@@%##%%%%%%%%%%%%%%%%%%**+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##**++++===+*%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%% :::::::::::---=#%%%%%@@@@%###%%%%%%%%%%#***+===*++++**%%%%%%%%%%%%@@@@@@@@@@@@@@@%#***++++**#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ::::::::-------+*#%%%%@@@@%####%%%%%%%%%##%%%%**+%%%%%@%%%%%%%%@@@@@@@@@@@@@@@@@@@@@%%######%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#% ::::::::------+#%%%%%@@@@@%####%%%%%%%%%##***++*++++*#%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%######%%%%%%%%%%%%%%%%%%%%%%%% :::::::::-----##**#%#**#%%%%###%%%%%%%%#######**+%%%%@@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%*+==+++%%%%%%%%%%%%%%%%%%%%%%%% :::::::::::::-++*#**#*#*+==--=*#%%%%%%%%%##***+*++++*%@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%##%##%%%%%%%%%%%%%%%%%%%%%%%%% :::::::::::..:+**#%*+=-::-=+*##%%%%%%%%++**###+*+%%%@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%% ::::::::::::-+*##+-:::-==+**##%%%%%%%%%%%%%##*+*+**+#@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#%%%%%%%%%%%%%%%%##***++=-: |
||||||
2024-04-16 09:18:39
↑ ↑ ↓ ↓ ← → ← → B A |
||||||
2024-01-17 09:14:22
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣶⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⠿⠟⠛⠻⣿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣆⣀⣀⠀⣿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠻⣿⣿⣿⠅⠛⠋⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢼⣿⣿⣿⣃⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣟⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣛⣛⣫⡄⠀⢸⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⡆⠸⣿⣿⣿⡷⠂⠨⣿⣿⣿⣿⣶⣦⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣾⣿⣿⣿⣿⡇⢀⣿⡿⠋⠁⢀⡶⠪⣉⢸⣿⣿⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⡏⢸⣿⣷⣿⣿⣷⣦⡙⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣇⢸⣿⣿⣿⣿⣿⣷⣦⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣵⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ |
||||||
2024-01-16 05:47:05
Welcome to San Andreas, I'm CJ from Grove Street Land of the heinous, gang bangers and cold heat In Los Santos, neighbors get no sleep Beefing with anybody competin', even police Four deep in a green rag with gold feet Blast wit' the flag on the strap, that's OG Stay in shape, hit the gym, lift the weights Get supercut and big and buff, nice and straight You got stats: Respect, weapon skill Stamina, muscle, fat and sex appeal You get clothes from Binco, and ProLaps Suburban, Zip, Victim and D-Sachs Watch yo' back when them rival hoods They'll test just to guess if your survival's good (Survival's good) Duckin' shells at the Cluckin' Bell Jump out, bus' a gun until they tuck they tail It seems like I'm on impossible missions Twisted predicaments, hostile positions Tenpenny and Pulaski harass me Cop cars been on our ass the last past week Cause the 'Dreas's full of gangsters, homeboy Hands is the language for the bangers, homeboy And it's dangerous, homeboy Get your brains 'fore how you do yo fingers, homeboy Heat cocked, we poppin' hot ones, dump 'em out Bend the block, shake before the cops come Listen for sirens, they don't got none Back another lap, catch a straggler with the shot gun Hittin' them up, what that Grove Street like In a dirty slingshot and old Levi's |
||||||
2023-12-15 07:14:46
#include <iostream> using namespace std; int main() { int n; long long int result=1; cin >> n; for(int i = 1; i < 6; ++i){ result *= n+i; } result /= 120; cout << result << endl; return 0; } |
||||||
2023-10-30 10:21:15
AMAR IS GAY BECAUSE SHE IS LESBIAN AND TRANSGENDER AND SHE CHANGED HER SEX AND SHE TURNED MAN BUT SHE LOVED A GUY AND FINALLY SHE IS GAY |
||||||
2023-10-20 08:03:46
ene tomyo tarhiig mn huchindej bn |
||||||
2023-02-12 04:44:47
ene bol hogiin bodlog ym aa |
||||||
2022-09-25 02:56:43
boolean f=true; Scanner scan = new Scanner (System.in); int nu1=0; while(f) { nu1 = scan.nextInt(); if(nu1<=50) { f=false; } } int nu2=(nu1+1)*(nu1+2)*(nu1+3)*(nu1+4)*(nu1+5)/120; System.out.print(nu2); |