結果

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

ソースコード

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) { cnt1++; }
        else if(legs==2 || legs%2==0) { cnt2++; }
        else {continue;}
    }
    printf("%d %d\n", cnt1, cnt2);
    return 0;
}
0