QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#750182 | #7799. Divisibility Trick | Gourab_Biswas | AC ✓ | 0ms | 3788kb | C++20 | 2.2kb | 2024-11-15 13:17:11 | 2024-11-15 13:17:13 |
Judging History
answer
///jai sri krishna
///jai maa kali
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef tree<
ll,
null_type,
less_equal<ll>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define db double
#define pii pair<ll,ll>
#define f(i,a,b) for(ll i=a;i<b;i++)
#define fi(i,a,b,c) for(ll i=a;i<b;i+=c)
#define fr(i,a,b) for(ll i=a;i>=b;i--)
#define fri(i,a,b,c) for(ll i=a;i>=b;i-=c)
#define pb push_back
#define ss second
#define ff first
#define in insert
#define sq(x) (x*x)
#define all(a) a.begin(),a.end()
#define nl '\n'
#define npii pair<ll,ll>
#define mnpq priority_queue <npii, vector<npii>, greater<npii> >
ll gcd(ll a,ll b){
if(b==0)return a;
return gcd(b,a%b);
}
int getRandom(int L,int R)
{
return rng()%(R-L+1) + L;
}
ll lcm(ll a,ll b){
return ((a)/gcd(a,b))*b;
}
ll bigmod(ll a,ll n,ll md){
if(n==0){
return 1;
}
if(n==1){
return a%md;
}
ll d= bigmod(a,n/2,md);
if(n%2==0){
return (d*d)%md;
}
else{
return ( ((d*d)%md) * (a%md) )%md;
}
}
bool sortbysec(const pair<int,int> &a,
const pair<int,int> &b)
{
if(a.first==b.first){
return (a.second > b.second);
}
return (a.first< b.first);
}
const ll N = 200005;
const ll mod = 998244353;
const ll neginf= -1e18;
const ll inf = 1e18;
const ld eps= 1e-9;
/// Think reverse order
/// think 10 minute before submission
/// wrong submission have 20 minute penalty
/// use binary search for maximum minimum problem
/// use broute force to check test case in another solution
ll digsm(ll d){
ll sm=0;
while(d>0){
ll e=d%10;
sm+=e;
d/=10;
}
return sm;
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll n;
cin>>n;
f(i,0,n)cout<<n;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3728kb
input:
3
output:
333
result:
ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
13
output:
13131313131313131313131313
result:
ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
1
output:
1
result:
ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2
output:
22
result:
ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
4
output:
4444
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
15
output:
151515151515151515151515151515
result:
ok
Test #7:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
24
output:
242424242424242424242424242424242424242424242424
result:
ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
42
output:
424242424242424242424242424242424242424242424242424242424242424242424242424242424242
result:
ok
Test #9:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
123
output:
123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123...
result:
ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
239
output:
239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239239...
result:
ok
Test #11:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
543
output:
543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543543...
result:
ok
Test #12:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
666
output:
666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666...
result:
ok
Test #13:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
777
output:
777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...
result:
ok
Test #14:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
888
output:
888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888...
result:
ok
Test #15:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
1000
output:
100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000...
result:
ok
Test #16:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
5
output:
55555
result:
ok
Test #17:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
6
output:
666666
result:
ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
7
output:
7777777
result:
ok
Test #19:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
8
output:
88888888
result:
ok
Test #20:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
9
output:
999999999
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
10
output:
10101010101010101010
result:
ok
Test #22:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
11
output:
1111111111111111111111
result:
ok
Test #23:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
12
output:
121212121212121212121212
result:
ok
Test #24:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
16
output:
16161616161616161616161616161616
result:
ok
Test #25:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
18
output:
181818181818181818181818181818181818
result:
ok
Test #26:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
20
output:
2020202020202020202020202020202020202020
result:
ok
Test #27:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
22
output:
22222222222222222222222222222222222222222222
result:
ok
Test #28:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
999
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok
Test #29:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
953
output:
953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953953...
result:
ok
Test #30:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
971
output:
971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971971...
result:
ok
Test #31:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
977
output:
977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977977...
result:
ok
Test #32:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
983
output:
983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983983...
result:
ok
Test #33:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
811
output:
811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811811...
result:
ok
Test #34:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
821
output:
821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821821...
result:
ok
Test #35:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
823
output:
823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823823...
result:
ok
Test #36:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
857
output:
857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857857...
result:
ok
Test #37:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
863
output:
863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863863...
result:
ok
Test #38:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
887
output:
887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887887...
result:
ok
Test #39:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
937
output:
937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937937...
result:
ok
Test #40:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
941
output:
941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941941...
result:
ok
Test #41:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
900
output:
900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900900...
result:
ok
Test #42:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
800
output:
800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800800...
result:
ok
Test #43:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
700
output:
700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700700...
result:
ok
Test #44:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
100
output:
100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100
result:
ok
Test #45:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
985
output:
985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985985...
result:
ok
Test #46:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
950
output:
950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950950...
result:
ok
Test #47:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
998
output:
998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998998...
result:
ok
Test #48:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
988
output:
988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988988...
result:
ok
Extra Test:
score: 0
Extra Test Passed