QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#659017 | #7111. Press the Button | 11131241 | WA | 0ms | 3520kb | C++17 | 1.6kb | 2024-10-19 18:15:09 | 2024-10-19 18:15:14 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef unsigned long long ull;
using ld = long double;
#define PII pair<int, int>
#define inf 0x3f3f3f3f
#define INF 0x7fffffff
#define lowbit(x) ((x) & (-x))
double PI = acos(-1.0);
#define eps 1e-7
const int d[4][2] = { {1, 0}, {-1, 0}, {0, 1}, {0, -1} };
const int maxn = 2e8 + 5;
const int mod = 998244353;
const int N = 1011;
int fast_Pow(int a, int n, int mod)
{
int ans = 1 % mod;
a %= mod;
while (n)
{
if (n & 1)
ans = (ans * a) % mod;
a = (a * a) % mod;
n >>= 1;
}
return ans;
}
void solve()
{
int a, b, c, d,v;
int t;
int cnt = 0;
int now =0;
int time = 0;
cin >> a >> b >> c >> d >>v>> t;
t *= 2;
time = v * 2 + 1;
while (now <= t)
{
for (int i =time; i > 0; i--)
{
if (now == t)
{
if ((i / 2) % a == 0 and i % 2 == 0)
cnt ++;
else if ((i / 2) % b == 0 and i % 2 == 0)
cnt ++;
now++;
break;
}
if ((i / 2) % a == 0 and i%2==0)
cnt += b;
if ((i / 2) % c == 0 and i % 2 == 0)
cnt += d;
now++;
}
now++;
}
cout << cnt<<endl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int tcase = 1;
cin >> tcase;
while (tcase--)
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3520kb
input:
2 8 2 5 1 2 18 10 2 5 1 2 10
output:
0 0
result:
wrong answer 1st numbers differ - expected: '6', found: '0'