// store value in array
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
Person[] person=new Person[num];
for(int i=0;i<num;i++){
int personId=sc.nextInt();sc.nextLine();
String personName=sc.nextLine();
String personAddress=sc.nextLine();
person[i]=new Person(personId, personName, personAddress);
}
for(int i=0;i<person.length;i++){
System.out.println(person[i].personId);
System.out.println(person[i].personName);
System.out.println(person[i].personAddress);
}
}
}
class Person{
int personId;
String personName;
String personAddress;
public Person(int personId,String personName,String personAddress){
this.personId=personId;
this.personName=personName;
this.personAddress=personAddress;
}
public int getPersonId(){
return personId;
}
public String getpersonName(){
return personName;
}
public String personAddress(){
return personAddress;
}
//total
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
sc.nextLine();
Student[] student=new Student[num];
for(int i=0;i<num;i++){
int studentId=sc.nextInt();sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
student[i]=new Student(studentId, studentName, studentMarks);
}
float res=findTotalStudentMarks(student);
System.out.println(res);
}
public static float findTotalStudentMarks(Student[] student){
float sum=0;
for(int i=0;i<student.length;i++){
sum=sum+student[i].studentMarks;
}
return sum;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,String studentName,float studentMarks){
this.studentId=studentId;
this.studentName=studentName;
this.studentMarks=studentMarks;
}
//average
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
sc.nextLine();
Student[] student=new Student[num];
for(int i=0;i<num;i++){
int studentId=sc.nextInt();sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
student[i]=new Student(studentId, studentName, studentMarks);
}
float res=findAverageStudentMarks(student);
System.out.format("%.2f",res);
}
public static float findAverageStudentMarks(Student[] student){
float sum=0;
float avg;
for(int i=0;i<student.length;i++){
sum=sum+student[i].studentMarks;
}
avg=sum/student.length;
return avg;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,String studentName,float studentMarks){
this.studentId=studentId;
this.studentName=studentName;
this.studentMarks=studentMarks;
}
//min marks
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
sc.nextLine();
Student[] student=new Student[num];
for(int i=0;i<num;i++){
int studentId=sc.nextInt();sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
student[i]=new Student(studentId, studentName, studentMarks);
}
Student res=findMinimumStudentMarks(student);
System.out.println(res.studentMarks);
}
public static Student findMinimumStudentMarks(Student[] student){
float min=Integer.MAX_VALUE;
Student temp=null;
for(int i=0;i<student.length;i++){
if(student[i].studentMarks<min){
min=student[i].studentMarks;
temp=student[i];
}
}
return temp;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,String studentName,float studentMarks){
this.studentId=studentId;
this.studentName=studentName;
this.studentMarks=studentMarks;
}
//max marks
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
sc.nextLine();
Student[] student=new Student[num];
for(int i=0;i<num;i++){
int studentId=sc.nextInt();sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
student[i]=new Student(studentId, studentName, studentMarks);
}
Student res=findMaximumStudentMarks(student);
System.out.format("%.1f",res.studentMarks);
}
public static Student findMaximumStudentMarks(Student[] student){
float max=0;
Student temp=null;
for(int i=0;i<student.length;i++){
if(student[i].studentMarks>max){
temp=student[i];
max=student[i].studentMarks;
}
}
return temp;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,String studentName,float studentMarks){
this.studentId=studentId;
this.studentName=studentName;
this.studentMarks=studentMarks;
}
//find by name
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[]) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int num=sc.nextInt();
sc.nextLine();
Student[] student=new Student[num];
for(int i=0;i<num;i++){
int studentId=sc.nextInt();sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
student[i]=new Student(studentId, studentName, studentMarks);
}
sc.nextLine();
String input=sc.nextLine();
Student res=findStudent(student,input);
if(res!=null){
System.out.println(res.getStudentId());
}
else{
System.out.println("No student found");
}
}
public static Student findStudent(Student[] student,String input){
Student temp=null;
for(int i=0;i<student.length;i++){
if(student[i].getStudentName().equalsIgnoreCase(input)){
temp=student[i];
}
}
return temp;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,String studentName,float studentMarks){
this.studentId=studentId;
this.studentName=studentName;
this.studentMarks=studentMarks;
}
public int getStudentId(){
return studentId;
}
public String getStudentName(){
return studentName;
}
public float getStudentMarks(){
return studentMarks;
}
//count marks score
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[] ) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
Student[] students=new Student[n];
for(int i=0;i<n;i++){
int studentId=sc.nextInt();
sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
students[i]=new Student(studentId, studentName, studentMarks);
}
sc.nextLine();
float limitMarks=sc.nextFloat();
int result=findStudentWhoScoredGreaterMarks(students,limitMarks);
System.out.println(result);
}
public static int findStudentWhoScoredGreaterMarks(Student[] students,float
limitMarks){
int counter=0;
Student result=null;
for(int i=0;i<students.length;i++){
if(students[i].getStudentMarks()>limitMarks){
counter++;
}
}
return counter;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,
String studentName,
float studentMarks){
this.studentId=studentId;
this.studentMarks=studentMarks;
this.studentName=studentName;
}
public int getStudentId(){
return studentId;
}
public String getStudentName(){
return studentName;
}
public float getStudentMarks(){
return studentMarks;
}
}
//lower score
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String args[] ) throws Exception {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
Student[] students=new Student[n];
for(int i=0;i<n;i++){
int studentId=sc.nextInt();
sc.nextLine();
String studentName=sc.nextLine();
float studentMarks=sc.nextFloat();
students[i]=new Student(studentId, studentName, studentMarks);
}
sc.nextLine();
float limitMarks=sc.nextFloat();
int result=findStudentWhoScoredGreaterMarks(students,limitMarks);
System.out.println(result);
}
public static int findStudentWhoScoredGreaterMarks(Student[] students,float
limitMarks){
int counter=0;
Student result=null;
for(int i=0;i<students.length;i++){
if(students[i].getStudentMarks()<limitMarks){
counter++;
}
}
return counter;
}
}
class Student{
int studentId;
String studentName;
float studentMarks;
public Student(int studentId,
String studentName,
float studentMarks){
this.studentId=studentId;
this.studentMarks=studentMarks;
this.studentName=studentName;
}
public int getStudentId(){
return studentId;
}
public String getStudentName(){
return studentName;
}
public float getStudentMarks(){
return studentMarks;
}
}