結果
問題 |
No.112 ややこしい鶴亀算
|
ユーザー |
![]() |
提出日時 | 2018-02-16 17:51:28 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-12 00:18:15 |
合計ジャッジ時間 | 984 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 11 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d",&a[i]); | ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(void) { int n; int a[50]; int i; int z=0,x=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=0;i<n;i++){ if(a[i]%4==0){ z+=a[i]/4; //printf("%d\n",z); } } printf("%d %d\n",n-z,z); return 0; }