文章标题
来源:互联网 发布:mac白屏很久 编辑:程序博客网 时间:2024/06/06 04:02
第四题
Largest palindrome product
int is_huiwen(int x){ int high = pow(10, floor(log10(x))); int low; while(high > 0) { low = x % 10; int high1 = x / high; if(high1 != low) return 0; x %= high; x /= 10; high /= 100; } return 1;}void example4(){ bool flag = 0; int maxm = 1; for(int i = 999; i >= 100; i--) { for(int j = i; j >= 100; j--) { if(is_huiwen(i * j)) { if(i * j > maxm) maxm = i * j; } } } printf("%d\n", maxm);}
阅读全文
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- Python系统编程(多线程-互斥锁-死锁-thread-threading)
- 4.3
- PAT (Advanced Level) Practise
- MyBatis之级联
- Log4j入门之001
- 文章标题
- 字段的数据类型
- PAT (Advanced Level) Practise
- C++ ~ Time类实例研究
- BigInteger/BigDeciaml/Calendar/Data/System常用类
- 【C语言】"for" "while" "do……while"
- zubax_gnss移植到STM32F407
- 使用React Native 和 微信小程序 编写的一款阅读类app ———《轻松一刻》
- Linux平台下搭建FTP服务器