Codeforces Design Tutorial: Learn from Math
来源:互联网 发布:exe解压软件安卓版 编辑:程序博客网 时间:2024/05/20 04:48
题目链接:http://codeforces.com/problemset/problem/472/A
import java.util.Scanner;public class Learn_from_Math {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);int n = scanner.nextInt();for(int i = 3; i < n; i++) {if(!isPrime(i) && !isPrime(n-i)) {System.out.println(i+" "+(n-i));break;}}}public static boolean isPrime(int k ) {for(int i = 2; i * i <= k; i++) {if(k % i == 0) return false;}return true;}}
阅读全文
0 0
- Codeforces Design Tutorial: Learn from Math
- codeforces 472A. Design Tutorial: Learn from Math
- codeforces-#472A. Design Tutorial: Learn from Math
- codeforces 472A Design Tutorial: Learn from Math
- cf472A Design Tutorial: Learn from Math
- A. Design Tutorial: Learn from Math
- A. Design Tutorial: Learn from Math
- 472A - Design Tutorial: Learn from Math
- 472A - Design Tutorial: Learn from Math
- codeforces 之 Design Tutorial: Learn from Life
- 【CODEFORCES】 B. Design Tutorial: Learn from Life
- Codeforces #270 A. Design Tutorial: Learn from Math(数论:素数判断)
- CF 472A Design Tutorial: Learn from Math
- Codeforces 472B - Design Tutorial: Learn from Life(模拟)
- codeforces-#472B. Design Tutorial: Learn from Life(贪心)
- Codeforces Round #270--B. Design Tutorial: Learn from Life
- cf472B Design Tutorial: Learn from Life
- B. Design Tutorial: Learn from Life
- win7下安装anaconda
- 如何实现H5游戏的连续性
- 文章标题
- javascript笔记
- 负面SEO新方法:用户体验攻击
- Codeforces Design Tutorial: Learn from Math
- thread32
- 深入浅出-iOS函数式编程的实现 && 响应式编程概念
- thread32
- springmvc 文件上传及压缩的配置详解
- 31.java解决百钱买百鸡的问题
- Spring属性依赖注入(手动装配)
- wamp部署https过程记录及无法启动问题解决
- IC设计基础系列之低功耗篇1:(数字IC)低功耗设计入门(一)——低功耗设计目的与功耗的类型