Codeforces Round #739 (Div. 3)

套题名称原题地址#题目分数是否ACA800✅B1000✅C2000✅D1800❌E2000❌F2300❌G2400❌H2400❌I2400❌J2400❌K2400❌L2400❌M2400❌N2400❌A. 题目题目类型   题意   分析   时间复杂度   O()O( )O()
摘要由CSDN通过智能技术生成

Codeforces Round #739 (Div. 3)

原题地址

# 题目 分数 是否AC
A Dislike of Threes 800
B Who’s Opposite? 800
C Infinity Table 800
D Make a Power of Two 1300
E Polycarp and String Transformation 1800
F1 Nearest Beautiful Number (easy version) 1900
F2 Nearest Beautiful Number (hard version) 2100





A. Dislike of Threes

题目类型  

题意

  


分析

  


时间复杂度

   O ( 1000 ) O( 1000 ) O(1000)


代码

    static int[] TB = new int[10010];
 
    public static void solve() throws IOException {
   
        pw.println(TB[nextInt()]);
    }
 
    public static void makeTB() {
   
        int num = 1;
        for (int i = 1; i < TB.length; i++) {
   
            while (num % 10 == 3 || num % 3 == 0) num++;
            TB[i] = num++;
        }
    }
    





B. Who’s Opposite?

题目类型  

题意

  


分析

  


时间复杂度

   O ( 1 ) O( 1 ) O(1)


代码

    public static void solve() throws IOException {
   
        int a = nextInt();
        int b = nextInt();
        int c = nextInt();
 
        int sum = Math.abs(a - b) * 2;
 
        if (sum < a || sum < b || sum < c) {
   
            pw.println(-1);
            return ;
        }
 
 
        if (c > sum / 2) pw.println(c - sum / 2);
        else pw.println(c + sum / 2);
    }
    





C. Infinity Table

题目类型  

题意

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值