4.2w+
社区成员
package lanqiaobei.exe.day05;
public class 数的分解 {
public static void main(String[] args) {
int res = 0;
for(int i = 1; i < 2019; i++){
if(!pd(i))continue;
for(int j = i + 1; j <= 2019 - i; j ++){
if(!pd(j))continue;
for(int k = j + 1; k <= 2019 - j; k++){
if (!pd(k))continue;
if (i + j + k == 2019){
res++;
}
}
}
}
System.out.println(res);
}
static boolean pd(int num){
while(num != 0){
if(num % 10 == 2 || num % 10 == 4)return false;
num /= 10;
}
return true;
}
}
import java.io.*;
import java.util.*
public class 考勤刷卡 {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException {
int n = Integer.parseInt(br.readLine());
TreeSet<Integer> set = new TreeSet<>();
while (n -- != 0){
String[] s = br.readLine().split(" ");
set.add(Integer.parseInt(s[1]));
}
for (int ans:set) System.out.println(ans);
}
}
import java.util.Scanner;
public class 卡片 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 1;;i++){
if(i * (i + 1) >= 2 * n) {
System.out.println(i);
break;
}
}
}
}