結果

問題 No.112 ややこしい鶴亀算
ユーザー hiyori
提出日時 2017-08-31 20:03:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 62,080 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-06 16:42:30
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 2 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main()
{
    int n;
    cin>>n;
    int legs,cnt1=0,cnt2=0;
    while(n--) {
        cin>>legs;
        if(legs==2) { cnt1++; }
        else if(legs==4) { cnt2++; }
        else {continue;}
    }
    printf("%d %d\n", cnt1, cnt2);
    return 0;
}
0