How to find number of values x which achieve GCD(n, x) = 1
n is constant
x <= m
m can be bigger than n
the related problem to this question that I am trying to solve:
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3839 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | Geothermal | 3569 |
8 | ecnerwala | 3494 |
9 | Um_nik | 3396 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | Um_nik | 164 |
2 | -is-this-fft- | 162 |
3 | maomao90 | 159 |
4 | atcoder_official | 158 |
4 | cry | 158 |
4 | awoo | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | TheScrasse | 153 |
10 | Dominater069 | 152 |
How to find number of values x which achieve GCD(n, x) = 1
n is constant
x <= m
m can be bigger than n
the related problem to this question that I am trying to solve:
If I have a Program.exe that takes input and print it.
If I want to run this program from the cmd I will go to its directory and write Program.exe (enter).
And what is going to happen a new line and waiting for the input.
But what if I want to give the input at the same line like that :
c:\Users\abc> Program.exe input
and that's it the program doesn't ask for input(as I gave it at the same line when I invoked the program) and print the output and terminate
I am working with c++.
AT this problem https://mirror.codeforces.com/gym/102470/problem/A (short statment below)
after three days of coding to avoid runtime error I get TLE on a binary search solution can someone explain what is wrong with my solution
the short statement : You are given set of points (x,y) find point on (y = 0) which all point can go to this point in minimum time and all have the same speed which is one meter per second
my code : https://mirror.codeforces.com/contest/1445/submission/98270485 (the code has comments :)
I really want to know how to solve this problem :
You are given two positive integers d and s. Find minimal positive integer n which is divisible by d and has sum of digits equal to s.
the link : https://mirror.codeforces.com/contest/1070/problem/A
If I am calling too many functions which is more than allowed in the memory limit I will get run time error or memory limit exceeded ? like in this code https://mirror.codeforces.com/contest/1067/submission/85187079
UPD If I am calling too many functions which is more than the stack size I will get run time error or memory limit exceeded ?
Can someone provide a tutorial on how to use prefix sum with dynamic programming ?
Given a string consist just of the letter 'u' ,if we can consider every two adjacent 'u' -->' w' and every u can be used only once in how many ways the string can appear ?
example : uuu can be uuu or wu or u w so the answer is 3 .
I am asking this question because at the last contest I was trying to solve this problem https://mirror.codeforces.com/contest/1245/problem/C and I claim the solution is every continuous 'u' or 'n' I save in how many ways it can appear in a vector and then multiply all the numbers and this is the answer .
Название |
---|