求答案

Kris_liuyi 2023-10-21 15:46:23 2023-12-29 17:44:11

半素数(L2考试) 请回复代码

共 2 条回复

zhenghaoyuan

int findFirstKey(int a[],int b,int c){ for (int i = 1;i<=b;i++){ if (a[i] == c) return i; } return -1; }

zhouzixiao

#include <bits/stdc++.h> #include #include using namespace std; void jjj(long long n,long long x){ int res[65],size=0; do{ res[size++]=n%x; n/=x; }while(n); for(int i=size-1;i>=0;i--){ cout<<res[i]; } } int main(){ long long n,x; cin>>n>>x; jjj(n,x); return 0; }