結果
問題 |
No.313 π
|
ユーザー |
![]() |
提出日時 | 2015-12-06 00:19:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 454 bytes |
コンパイル時間 | 239 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 14:54:46 |
合計ジャッジ時間 | 1,364 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%s", s); | ~~~~~^~~~~~~~~
ソースコード
#include <stdio.h> #define DEG 200000 char s[DEG + 3]; int counter[10]; int num[10] = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; int main(void) { scanf("%s", s); int i; for(i = 0; i < DEG + 2; i++) { if(i != 1) { counter[ s[i] - '0' ]++; } } for(i = 0; i < 10; i++) { if(counter[i] < num[i]) { printf("%d ", i); } } for(i = 0; i < 10; i++) { if(counter[i] > num[i]) { printf("%d\n", i); } } return 0; }