結果
問題 |
No.338 アンケート機能
|
ユーザー |
![]() |
提出日時 | 2017-02-04 13:36:21 |
言語 | C90 (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 306 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 06:13:21 |
合計ジャッジ時間 | 1,316 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 RE * 9 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d %d", &a, &b); | ^~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <math.h> #define rep(i, n) for (i = 0; i < n; i++) int main() { int a, b; scanf("%d %d", &a, &b); int i, j; rep(i, 101) rep(j, 101) { int _a = round((double)i / (i + j) * 100); int _b = round((double)j / (i + j) * 100); if (_a == a && _b == b) { printf("%d\n", i + j); return 0; } } return 1; }