結果
問題 |
No.218 経験値1.5倍
|
ユーザー |
|
提出日時 | 2015-12-24 02:02:39 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 423 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 19,840 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-18 22:32:18 |
合計ジャッジ時間 | 1,310 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 WA * 12 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:9:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d", &a); | ^~~~~~~~~~~~~~~ main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d", &b); | ^~~~~~~~~~~~~~~ main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d", &c); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void) { int a; int b; int c; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); int normal = 1; while ( 1 ) { b *= normal; normal++; if ( b > a ) { break; } } int bonus = 1; while ( 1 ) { c *= bonus; bonus++; if ( c > a ) { break; } } if ( (double)((bonus - 1) / (normal - 1)) <= (double)(2 / 3) ) { puts("YES"); } else { puts("NO"); } return 0; }