[백준] 10797번 : 10부제 - Dart(다트)

강재원·2022년 9월 13일
0

[코딩테스트] Dart

목록 보기
29/100



https://www.acmicpc.net/problem/10797

import 'dart:io';
void main(){
    int? n=int.parse(stdin.readLineSync()!);
    String? m=stdin.readLineSync();
    final v=m!.split(' ').map<int>((o)=>int.parse(o));
    var count=0;
    for(var i=0;i<5;i++){
        var a=v.elementAt(i);
        if(n==a) count++;
    }
    print(count);
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글