摘要:
C++(C改一改输入输出即可) 1 #include<iostream> 2 #include <cmath> 3 using namespace std; 4 5 bool isprime(int i) { 6 for (int j = 2; j <= sqrt(i); ++j) { 7 if ( 阅读全文
摘要:
C/C++ 1 #include<iostream> 2 using namespace std; 3 4 int main() { 5 int n = 0; 6 cin >> n; 7 int b = n / 100; 8 int s = n / 10 % 10; 9 int g = n % 10 阅读全文
摘要:
C++ 1 #include <iostream> 2 #include <vector> 3 #include <algorithm> 4 using namespace std; 5 bool cmp(int a, int b) { 6 return a > b; 7 } 8 int main( 阅读全文
摘要:
JAVA 写的很冗余,也没考虑类之间的关系,还能更简洁,更高效,仅做参考 有时间考虑做一个学生数据库 1 import java.util.Arrays; 2 import java.util.HashMap; 3 import java.util.Scanner; 4 5 public class 阅读全文
摘要:
Python 1 num = eval(input()) 2 an = [] 3 for i in range(0,num): 4 str = input() 5 P = str.count('P') 6 T = str.count('T') 7 A = str.count('A') 8 sum = 阅读全文
摘要:
C/C++ 1 #include<stdio.h> 2 3 int main(){ 4 char str[10][5] = {"ling","yi","er","san","si","wu","liu","qi","ba","jiu"}; 5 char num[100]; 6 int sum = 0 阅读全文
摘要:
C 1 #include<stdio.h> 2 3 int main(){ 4 int n = 0; 5 int num = 0; 6 //printf("请输入一个不超过1000的正整数:"); 7 scanf("%d", &num); 8 while(num != 1){ 9 if(num%2 阅读全文