Show all threads Hide all threads Show all messages Hide all messages |
Here's the equation | Ajay Subhash Jadhav | 1925. British Scientists Save the World | 5 Aug 2023 23:21 | 1 |
Just prepare the equation as described and solve for c=x, display_sum + k - (entered_sum + x) == (n + 1) * 2; display_sum + k - entered_sum - x = 2 * n + 2; x = -2 * n - 2 + display_sum + k - entered_sum; if x < 0 then Big Bang! |
WA 4, why not? (python 3.8) | klimvetoshkin | 1925. British Scientists Save the World | 4 Feb 2023 11:30 | 1 |
n,k = map(int, input().split()) kol = 0 u = 1 for i in range(n): a, b = map(int, input().split()) if a - b == 2: kol += u else: u = 0 if kol == 0: print('Big Bang!') else: print(kol) |
If you cant understand what you must do (Объяснение алгоритма) | Alexandr | 1925. British Scientists Save the World | 21 Feb 2022 09:47 | 1 |
Определим переменную difference Затем для каждого элемента истории прибавляем к difference разницу между числом с компьютера - 2 и введённым числом В конце проверяем k - 2 + difference, если оно меньше нуля, то мы в пролете, иначе вывести число |
WA #4;can anyone help? | jim | 1925. British Scientists Save the World | 21 Jan 2020 23:10 | 2 |
#include <iostream> using namespace std; int main() { int n, k; int i; int show, type; int showTotal = 0, typeTotal = 0; int neededType; cin >> n >> k; for ( i = 1; i <= n; i++) { cin >> show >> type; if (show - type == 2) showTotal = typeTotal = 0; else { showTotal += show; typeTotal += type + 2; } } neededType = k + showTotal - typeTotal - 2; if (neededType > 0 && neededType < 101) cout << neededType << endl; else { cout << "Big Bang!" << endl; } return 0; } maybe problem in this neededType > 0 || neededType < 101 UPD: result must be only bigger than zero! i have AC) Edited by author 21.01.2020 23:21 |
Always Wa#5,who AC give me a tip | Pegasus | 1925. British Scientists Save the World | 24 Dec 2018 00:27 | 2 |
Result may be greater than 100 |
What is the 5th test? | KVN-Khai>>Ann | 1925. British Scientists Save the World | 24 Dec 2018 00:27 | 3 |
Do you say about your problem? Result may be greater than 100 |
an example for those,who also didn't understand task condition | a2ch | 1925. British Scientists Save the World | 23 Jul 2018 21:14 | 1 |
#include <iostream> using namespace std; int main(){ int n(0),m(0),last(0),temp_f(0),temp_s(0),end_(0); cin >> n >> m; for(int i = 0;i<n;++i){ cin >> temp_f >> temp_s; last += temp_f-2-temp_s; } end_ = last + (m - 2); if(end_ < 0)cout << "Big Bang!"; else cout << end_; return 0; } |
F. British scientists save the world | cplayer | 1925. British Scientists Save the World | 24 Mar 2016 02:00 | 8 |
Why the 2nd sample's answer is Big Bang? But why realy? I cant understand and could you please explain the first test too? Because the expected sum is 4+3-2*2(sum of the numbers shown on the screen+k-(n+1)*2) while the real sum is 6+x(the sum of the inputed numbers+the number YOU have to input), but they have to be equal: 4+3-2*2=6+x 7-4=6+x x=-3, but the answer is non-negative, so it is "Big Bang!". (in first sample you have 3+3+5+6+5+7+5-7*2 as the expected sum, and 1+1+3+5+5+2+x as the real sum: 3+3+5+6+5+7+5-7*2=1+1+3+5+5+2+x 34-14=17+x x=20-17 x=3 ) X is the output number. Or at least that is how i understood this problem. edit: what is the limit of X??? Edited by author 27.10.2012 15:43 You answer is kick ass. How can you figure out something like that? I check again and again, and it seems gibberish to me. I don't understand (n+1)*2. Can you tell me Why do you subtract (n+1)*2; Cause we subtracted 2 n+1 times |
Does the last test taken into account for big bang?? | Anupam Ghosh, Wipro Technologies | 1925. British Scientists Save the World | 22 Mar 2015 20:24 | 4 |
the problem says " Moreover, they check only that the sum of all numbers entered since the last test matches the expected one." Thus should the new number entered in the test to check whether there is a big bang or not? If we have to take into account last input i.e. k value the the problem statement is incorrect. Please could someone explain this. Finally AC! understood the problem now. I wa#4, plz explain the problem for me Finally AC! understood the problem now. Can you give explanation?, please! |
No subject | mamur91 | 1925. British Scientists Save the World | 16 May 2014 11:50 | 1 |
Please give me some tests for #Wa4 ! |
F. British scientists save the world | cplayer | 1925. British Scientists Save the World | 27 Oct 2012 14:45 | 2 |
"which is less than the number shown on the screen by two" means 1/2 or n-2? |
F. О заслуге британских учёных | LeeMinHo | 1925. British Scientists Save the World | 27 Oct 2012 13:36 | 2 |
Может ли искомое число быть отрицательным |