QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#253578 | #7799. Divisibility Trick | Lynkcat# | AC ✓ | 1ms | 3492kb | C++20 | 806b | 2023-11-17 09:16:39 | 2023-11-17 09:16:39 |
Judging History
answer
#include<bits/stdc++.h>
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
#define int ll
// #define N
using namespace std;
void BellaKira()
{
int d;
cin>>d;
int n=d;
string st=to_string(d);
int sm=0;
for (auto u:st) sm+=u-'0';
sm%=d;
int t=1,all=sm;
while (all!=0) t++,all=(all+sm)%d;
for (int i=1;i<=t;i++) cout<<d;
}
signed main()
{
IOS;
cin.tie(0);
int T=1;
while (T--)
{
BellaKira();
}
}
/*list:
1.mod 998244353 or 1e9+7 or ???
2.N
3.duipai shuju xingtai duoyidian
...
*/
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3352kb
input:
3
output:
3
result:
ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
13
output:
13131313131313131313131313
result:
ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 3432kb
input:
1
output:
1
result:
ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3360kb
input:
2
output:
2
result:
ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
4
output:
4
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3328kb
input:
15
output:
1515151515
result:
ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
24
output:
24242424
result:
ok
Test #8:
score: 0
Accepted
time: 1ms
memory: 3472kb
input:
42
output:
42424242424242
result:
ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
123
output:
123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123
result:
ok
Test #10:
score: 0
Accepted
time: 1ms
memory: 3412kb
input:
239
output:
239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239...
result:
ok
Test #11:
score: 0
Accepted
time: 1ms
memory: 3372kb
input:
543
output:
543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543...
result:
ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3404kb
input:
666
output:
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
result:
ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
777
output:
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777
result:
ok
Test #14:
score: 0
Accepted
time: 0ms
memory: 3428kb
input:
888
output:
888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
result:
ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
1000
output:
100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000...
result:
ok
Test #16:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
5
output:
5
result:
ok
Test #17:
score: 0
Accepted
time: 0ms
memory: 3360kb
input:
6
output:
6
result:
ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 3352kb
input:
7
output:
7
result:
ok
Test #19:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
8
output:
8
result:
ok
Test #20:
score: 0
Accepted
time: 0ms
memory: 3300kb
input:
9
output:
9
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
10
output:
10101010101010101010
result:
ok
Test #22:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
11
output:
1111111111111111111111
result:
ok
Test #23:
score: 0
Accepted
time: 0ms
memory: 3452kb
input:
12
output:
12121212
result:
ok
Test #24:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
16
output:
16161616161616161616161616161616
result:
ok
Test #25:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
18
output:
1818
result:
ok
Test #26:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
20
output:
20202020202020202020
result:
ok
Test #27:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
22
output:
2222222222222222222222
result:
ok
Test #28:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
999
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
result:
ok
Test #29:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
953
output:
953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953...
result:
ok
Test #30:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
971
output:
971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971...
result:
ok
Test #31:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
977
output:
977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977...
result:
ok
Test #32:
score: 0
Accepted
time: 0ms
memory: 3408kb
input:
983
output:
983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983...
result:
ok
Test #33:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
811
output:
811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811...
result:
ok
Test #34:
score: 0
Accepted
time: 0ms
memory: 3384kb
input:
821
output:
821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821...
result:
ok
Test #35:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
823
output:
823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823...
result:
ok
Test #36:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
857
output:
857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857...
result:
ok
Test #37:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
863
output:
863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863...
result:
ok
Test #38:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
887
output:
887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887...
result:
ok
Test #39:
score: 0
Accepted
time: 0ms
memory: 3400kb
input:
937
output:
937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937...
result:
ok
Test #40:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
941
output:
941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941...
result:
ok
Test #41:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
900
output:
900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900
result:
ok
Test #42:
score: 0
Accepted
time: 0ms
memory: 3392kb
input:
800
output:
800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800
result:
ok
Test #43:
score: 0
Accepted
time: 0ms
memory: 3404kb
input:
700
output:
700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700
result:
ok
Test #44:
score: 0
Accepted
time: 0ms
memory: 3440kb
input:
100
output:
100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100
result:
ok
Test #45:
score: 0
Accepted
time: 0ms
memory: 3400kb
input:
985
output:
985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985...
result:
ok
Test #46:
score: 0
Accepted
time: 1ms
memory: 3492kb
input:
950
output:
950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950...
result:
ok
Test #47:
score: 0
Accepted
time: 1ms
memory: 3448kb
input:
998
output:
998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998...
result:
ok
Test #48:
score: 0
Accepted
time: 0ms
memory: 3444kb
input:
988
output:
988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988...
result:
ok
Extra Test:
score: 0
Extra Test Passed