結果

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

ソースコード

diff #

#include<iostream>
using namespace std;

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