結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2017-02-04 13:50:34 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 23,168 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 06:14:18 |
| 合計ジャッジ時間 | 1,064 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 RE * 1 |
コンパイルメッセージ
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, 201) rep(j, 201) {
int _a = round((double)i / (i + j) * 100) + 0.1;
int _b = round((double)j / (i + j) * 100) + 0.1;
if (_a == a && _b == b) {
printf("%d\n", i + j);
return 0;
}
}
return 1;
}
くれちー