結果

問題 No.1883 SLASH
ユーザー tnakao0123
提出日時 2022-03-28 20:25:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 43,716 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-07 11:05:08
合計ジャッジ時間 1,101 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 1883.cc:  No.1883 SLASH - yukicoder
 */

#include<cstdio>
#include<algorithm>
 
using namespace std;

/* constant */

const int N = 3;

/* typedef */

/* global variables */

char s[N + 4];

/* subroutines */

/* main */

int main() {
  scanf("%s", s);
  sort(s, s + N);

  printf("%d\n", s[N - 1] - s[0]);
  return 0;
}
0