結果
問題 | No.1280 Beyond C |
ユーザー |
|
提出日時 | 2021-03-04 17:27:22 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 602 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 31,488 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-05 03:23:13 |
合計ジャッジ時間 | 1,808 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 23 |
ソースコード
//1280 #include<stdio.h> #include<stdlib.h> #include<math.h> #include<time.h> int main(){ int n; int m; int c; int i; int j,k; int pd; double pb; int count1=0,count2=0; int a[100000]; int b[100000]; printf("input n,m,c\n"); scanf("%d,%d,%d",&n,&m,&c); printf("input a[i]\n"); for(i=0;i<n;i++){ scanf("%d,",&a[i]); } printf("input b[i]\n"); for(i=0;i<m;i++){ scanf("%d,",&b[i]); } for(j=0;j<n;j++){ for(k=0;k<m;k++){ pd=a[j]*b[k]; if(pd>c){ count1++; } else { count2++; } } } pb=(double)count1/(count1+count2); printf("%lf",pb); system("pause"); }