結果
| 問題 | No.313 π |
| コンテスト | |
| ユーザー |
zerokugi
|
| 提出日時 | 2015-12-11 23:32:32 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 5,000 ms |
| コード長 | 215 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 19,328 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-15 08:28:29 |
| 合計ジャッジ時間 | 1,715 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 |
コンパイルメッセージ
main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | main(i){
| ^~~~
main.c: In function ‘main’:
main.c:2:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
main.c:3:16: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
3 | while(~scanf("%c", &c))if(isdigit(c)) x[c - '0']--;
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | unsigned char c, x[11] = "dcdcbcbcda";
main.c:3:16: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
3 | while(~scanf("%c", &c))if(isdigit(c)) x[c - '0']--;
| ^~~~~
main.c:3:16: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:3:35: warning: implicit declaration of function ‘isdigit’ [-Wimplicit-function-declaration]
3 | while(~scanf("%c", &c))if(isdigit(c)) x[c - '0']--;
| ^~~~~~~
main.c:1:1: note: include ‘<ctype.h>’ or provide a declaration of ‘isdigit’
+++ |+#include <ctype.h>
1 | unsigned char c, x[11] = "dcdcbcbcda";
main.c:4:40: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
4 | for(i=10;i--;) if(x[i]%4 == 3) printf("%d ", i);
| ^~~~~~
main.c:4:40: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:4:40: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
main.c:4:40: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:5:40: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
5 | for(i=10;i--;) if(x[i]%4 == 1) printf("%d\n", i);
| ^~~~~~
ソースコード
unsigned char c, x[11] = "dcdcbcbcda";
main(i){
while(~scanf("%c", &c))if(isdigit(c)) x[c - '0']--;
for(i=10;i--;) if(x[i]%4 == 3) printf("%d ", i);
for(i=10;i--;) if(x[i]%4 == 1) printf("%d\n", i);
return 0;
}
zerokugi