結果
問題 | No.1828 Except 3 |
ユーザー |
![]() |
提出日時 | 2025-03-19 11:08:40 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 304 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 25,600 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-19 11:08:41 |
合計ジャッジ時間 | 1,101 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:35: warning: format ‘%lld’ expects argument of type ‘long long int *’, but argument 2 has type ‘long int *’ [-Wformat=] 10 | scanf("%lld",&num); | ~~~^ ~~~~ | | | | | long int * | long long int * | %ld main.c:17:20: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘long int’ [-Wformat=] 17 | printf("%lld",NotList[0]*NotList[1]*NotList[2]); | ~~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | long long int long int | %ld main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:10:25: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%lld",&num); | ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>void main(void){int n = 0;scanf("%d",&n);long int num = 0;long int NotList[3] = {0,0,0};for(int i = 0;i < 3;i++){for(int j = 0 ; j < n ; j++){scanf("%lld",&num);if(num %3 != 0){NotList[i]++;}}}printf("%lld",NotList[0]*NotList[1]*NotList[2]);}