• 注册
  • APC编程社群 APC编程社群 关注:10 内容:16

    回归了

  • 查看作者
  • 打赏作者
    • 社长
      L01

      我回归了!

      前年7TN57那个号忘了ID了(我也不知道咋忘得)

      步入正题:

      <——————————————->

      以前干了会网页(HTML+CSS+JS),C++基础,Python,ScratchToEXE等、、

      >但不精

      现在主攻C++,打算开个C++ 的club,不管怎样,先在这里挂着|审核

      总之,就是分享一些自己知道的东西,欢迎一起交流沟通 [s-1] 

      社长
      L01
      #include <iostream>#include <cstdlib>#include <cstring>#include <string>using namespace std;template <typename T>inline const bool not_found(const char a[], const T n) {//n:_Radix
          if (n >= 10) {
              return true;
          }
          for (int i = 0; i < strlen(a); i++) {
              if ((a[i] - '0') >= n)return false;
          }
          return true;}static void solve(const char a[], const char b[], const char c[]) {
          static char* end = new char;//废串,static 避免 stack overflow,new很有必要
          for (int i = 2; i <= 16; i++) {
              if (strtol(a, &end, i)*strtol(b,&end,i) == strtol(c, &end, i) && not_found(a,i) && not_found(b,i) && not_found(c,i)) {
                  cout << i;
                  end = NULL;//赋值NULL
                  return;
              }
          }
          cout << 0;
          end = NULL;//赋值NULL
          return;}void exe() {
          char a[20], b[20], c[20];//以char,数值不能大于10的18次方
          cin >> a >> b >> c;
          solve(a,b,c);//开始解决}int main() {
          exe();//启动
          return 0;}


      回复
      L55
      童年客服
      打赏了20童年币

      其实我没有离线!有事请留言,一般在两三小时内回复!

      回复

      请登录之后再进行评论

      登录
      • 社长
      • 副社长
    • 7TN57
    • 魏启轩
    • 暂没有数据

      • 回帖总排行
      • 采纳总排行
    • 朱策
      朱策
      874次回帖
    • 招来风
      招来风
      580次回帖
    • 巡视员
      巡视员
      472次回帖
    • 傅瑾
      傅瑾
      375次回帖
    • 雅典娜的布灵诊所
    • 墨儿
      墨儿
      222次回帖
    • 昭昭暮兮
      昭昭暮兮
      210次回帖
    • 祁絮
      祁絮
      205次回帖
    • 举一桐
      举一桐
      199次回帖
    • 怪而无才
      怪而无才
      187次回帖
    • 秦岭小娃
      秦岭小娃
      151次回帖
    • 股尾前科
      股尾前科
      135次回帖
    • LQM
      LQM
      126次回帖
    • 森屿
      森屿
      120次回帖
    • 将离~
      将离~
      112次回帖
    • 童小蜜
      童小蜜
      108次回帖
    • 祁絮
      祁絮
      1次被采纳
    • 王大大
      王大大
      1次被采纳
    • 招来风
      招来风
      1次被采纳
    • 朱策
      朱策
      1次被采纳
    • 怪而无才
      怪而无才
      1次被采纳
    • 把本页链接发给外网好友获得童年币:

    • 任务
    • AI聊天
    • 客服
    • 偏好
    • 到底部
    • 帖子间隔 侧栏位置: