結果

問題 No.46 はじめのn歩
ユーザー dashi_dragonsdashi_dragons
提出日時 2017-02-09 01:13:51
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 338 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 23,208 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-26 17:43:01
合計ジャッジ時間 1,026 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 0 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 0 ms
4,384 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 0 ms
4,384 KB
testcase_06 AC 0 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

unsigned long cal(unsigned long a,unsigned long b);

int main(){

  unsigned long a,b;
  char buf[20];

  fgets(buf,20,stdin);
  sscanf(buf,"%ld %ld",&a,&b);

  printf("%ld\n",cal(a,b));

  return 0;
}
unsigned long cal(unsigned long a,unsigned long b){

  if(b % a)
    return b / a + 1;

  else
    return b / a;
}

0