博客
关于我
Bear and Poker CodeForces - 573A
阅读量:259 次
发布时间:2019-03-01

本文共 1005 字,大约阅读时间需要 3 分钟。

????n??????????3??????2???????????????????

???

  • ???????????????2^a * 3^b * k??????k??2?3?????k?????????????2?3??????

  • ???k???????k?????????????a?b???????????????????k????????????2?3????????

  • ??????????k????????????2?3???????

  • ?????

  • ????????????????2?3??????
  • ????????????????
  • ????????YES????????NO??
  • ?????

    #include 
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    using namespace std;int root(int x) { while (x % 2 == 0) x /= 2; while (x % 3 == 0) x /= 3; return x;}int main() { int n; cin >> n; vector
    a(n); for (int i = 0; i < n; ++i) { a[i] = root(a[i]); } bool same = true; int first = a[0]; for (size_t i = 1; i < n; ++i) { if (a[i] != first) { same = false; break; } } if (same) { cout << "YES"; } else { cout << "NO"; }}

    ???

    • ????????root??????????????2?3?????????????
    • ???????????n????????
    • ????????????????????2?3?????????????
    • ??????????????????????
    • ??????????????YES???NO??

    ???????????????????????????????

    转载地址:http://tdnt.baihongyu.com/

    你可能感兴趣的文章
    QueryDict和模型表知识补充
    查看>>
    Querybase 使用与安装教程
    查看>>
    Playwright与Selenium的对比:谁是更适合你的自动化测试工具?
    查看>>
    PLC、DCS、SCADA的选型
    查看>>
    PLC中的电子凸轮的简单介绍
    查看>>
    PLC发展详解-ChatGPT4o作答+匹尔西
    查看>>
    PLC探针有什么用
    查看>>
    PLC接线详解
    查看>>
    PLC数组的使用(西门子)
    查看>>
    Quarzt定时调度任务
    查看>>
    PLC结构体(西门子)
    查看>>
    PLC编程语言ST文本语法的常用数据类型及变量
    查看>>
    PLC通讯方式
    查看>>
    Please install 'webpack-cli' in addition to webpack itself to use the CLI
    查看>>
    Ploly Dash,更新一个Dash应用程序JJJA上的实时人物
    查看>>
    Ploly烛台的定制颜色
    查看>>
    Ploly:如何在Excel中嵌入完全交互的Ploly图形?
    查看>>
    plotloss记录
    查看>>
    Plotly (Python) 子图:填充构面和共享图例
    查看>>
    Plotly 中的行悬停文本
    查看>>